diff options
Diffstat (limited to 'IkiWiki/Wrapper.pm')
-rw-r--r-- | IkiWiki/Wrapper.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/IkiWiki/Wrapper.pm b/IkiWiki/Wrapper.pm index 52a7ca2c7..deba58d28 100644 --- a/IkiWiki/Wrapper.pm +++ b/IkiWiki/Wrapper.pm @@ -75,6 +75,11 @@ $envsave newenviron[i]=NULL; environ=newenviron; + if (setregid(getegid(), -1) != 0 || setreuid(geteuid(), -1) != 0) { + perror("failed to drop real uid/gid"); + exit(1); + } + execl("$this", "$this", NULL); perror("failed to run $this"); exit(1); |