You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
441 B
25 lines
441 B
4 years ago
|
|
||
|
#include <stdio.h>
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
#define CERTBOT_BIN "@l_prefix@/libexec/certbot/certbot.sh"
|
||
|
|
||
|
int main(int argn, char **argv)
|
||
|
{
|
||
|
if (setuid(geteuid()) == -1) {
|
||
|
perror("setuid");
|
||
|
exit(1);
|
||
|
}
|
||
|
if (setgid(getegid()) == -1) {
|
||
|
perror("setgid");
|
||
|
exit(1);
|
||
|
}
|
||
|
argv[0] = CERTBOT_BIN;
|
||
|
if (execv(argv[0], argv) == -1)
|
||
|
abort();
|
||
|
return 0;
|
||
|
}
|
||
|
|