]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/misc-progs/ipfiredeath.c
Merge branch 'master' of git://git.ipfire.org/ipfire-2.x
[people/pmueller/ipfire-2.x.git] / src / misc-progs / ipfiredeath.c
1 /* SmoothWall helper program - smoothiedeath
2 *
3 * This program is distributed under the terms of the GNU General Public
4 * Licence. See the file COPYING for details.
5 *
6 * (c) Lawrence Manning, 2001
7 * Simple program intended to be installed setuid(0) that can be used for
8 * starting shutdown.
9 *
10 * $Id: ipcopdeath.c,v 1.2 2003/12/11 10:57:34 riddles Exp $
11 *
12 */
13
14 #include <stdlib.h>
15 #include "setuid.h"
16
17 int main(void)
18 {
19 if (!(initsetuid()))
20 exit(1);
21
22 safe_system("/sbin/shutdown -h now");
23
24 return 0;
25 }