Skip to content
Browse files

the gid must be set before the uid

In some cases, the new uid doesn't have the rights to change the gid.
  • Loading branch information...
1 parent eda67e4 commit 1f08a0192d78e2ca2e32371720514c3e101e0b7a @galdor galdor committed May 28, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 daemon.lisp
6 daemon.lisp
@@ -157,10 +157,10 @@ USER and GROUP can either be specified as numeric ids, or as strings.
(set-handler sb-posix:sighup hup)
(set-handler sb-posix:sigint int)
(set-handler sb-posix:sigterm term)
- (when uid
- (sb-posix:setuid uid))
(when gid
- (sb-posix:setgid gid)))
+ (sb-posix:setgid gid))
+ (when uid
+ (sb-posix:setuid uid)))
;; Parent
(when exit-parent

0 comments on commit 1f08a01

Please sign in to comment.
Something went wrong with that request. Please try again.