webconsole3
Last change
on this file since c1be3c5b was
6240405,
checked in by jm.bardallo <juanmanuel.bardallo@…>, 7 years ago
|
Version inicial de la consola web 3.0, de momento funcionará paralelamente a la consola web antigua
|
-
Property mode set to
100644
|
File size:
528 bytes
|
Line | |
---|
1 | #include <stdlib.h> |
---|
2 | #include <sys/types.h> |
---|
3 | #include <unistd.h> |
---|
4 | |
---|
5 | int main (int argc, char *argv[]) |
---|
6 | { |
---|
7 | |
---|
8 | if (setuid(0)) |
---|
9 | { |
---|
10 | perror("setuid"); |
---|
11 | return 1; |
---|
12 | } |
---|
13 | if(setgid(0)) |
---|
14 | { |
---|
15 | perror("setgid"); |
---|
16 | return 1; |
---|
17 | } |
---|
18 | |
---|
19 | /* WARNING: Only use an absolute path to the script to execute, |
---|
20 | * a malicious user might fool the binary and execute |
---|
21 | * arbitary commands if not. |
---|
22 | * */ |
---|
23 | return WEXITSTATUS(system ("/bin/bash /var/tmp/ogAdmClient")); |
---|
24 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.