]>
Commit | Line | Data |
---|---|---|
12938118 MT |
1 | /* SmoothWall helper program - smoothierebirth |
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 reboot. | |
9 | * | |
10 | * $Id: ipcoprebirth.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 -r now"); | |
23 | ||
24 | return 0; | |
25 | } |