diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-09-04 03:38:02 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-09-04 03:38:02 +0000 |
commit | ea95624e2d22fc1142d9a96acfcc9c6134395b4d (patch) | |
tree | a4ab61011f2c0b6ffeb0de4b03987e9ef3ef41ae /IkiWiki | |
parent | 69336315018287f8fab97bf2c17d10b8e3d712fc (diff) | |
download | ikiwiki-ea95624e2d22fc1142d9a96acfcc9c6134395b4d.tar ikiwiki-ea95624e2d22fc1142d9a96acfcc9c6134395b4d.tar.gz |
* Drop real uid/gid in the suid wrapper, thus allowing commits to remote
subversion repos and fixing some other issues.
Diffstat (limited to 'IkiWiki')
-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); |