mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-10 01:08:28 +02:00
fireinfo: Run action that was set on the webinterface immediately.
This commit is contained in:
23
src/misc-progs/fireinfoctrl.c
Normal file
23
src/misc-progs/fireinfoctrl.c
Normal file
@@ -0,0 +1,23 @@
|
||||
/* IPFire helper program - fireinfoctrl
|
||||
*
|
||||
* This program is distributed under the terms of the GNU General Public
|
||||
* Licence. See the file COPYING for details.
|
||||
*
|
||||
* (c) IPFire Team, 2011
|
||||
*
|
||||
* Simple program that calls "sendprofile" as the root user.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "setuid.h"
|
||||
|
||||
int main(void)
|
||||
{
|
||||
if (!(initsetuid()))
|
||||
exit(1);
|
||||
|
||||
safe_system("/usr/bin/sendprofile");
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user