Attached is the patch to fix this issue.
diff --git a/shared/tmp/Daemon.pm b/Daemon.pm
index 195798e..9acc7a9 100644
--- a/shared/tmp/Daemon.pm
+++ b/Daemon.pm
@@ -108,10 +108,16 @@ sub run {
# drop privileges if run as root
if(defined $o{gid_num} and defined $o{uid_num}){
- local $REAL_GROUP_ID= local $EFFECTIVE_GROUP_ID= getgrnam($o{gid});
- dieif($OS_ERROR,'Unable to change group_id to '.$o{gid});
- local $REAL_USER_ID= local $EFFECTIVE_USER_ID= getpwnam($o{uid});
- dieif($OS_ERROR,'Unable to change user_id to '.$o{uid});
+ my $gid = getgrnam($o{gid});
+ $EFFECTIVE_GROUP_ID= "$gid $gid";
+ dieif($OS_ERROR,'Unable to effective group_id to '.$o{gid});
+ $REAL_GROUP_ID= $gid;
+ dieif($OS_ERROR,'Unable to change real group_id to '.$o{gid});
+ my $uid = getpwnam($o{uid});
+ $EFFECTIVE_USER_ID = $uid;
+ dieif($OS_ERROR,'Unable to change effective user_id to '.$o{uid});
+ $REAL_USER_ID=$uid;
+ dieif($OS_ERROR,'Unable to change real user_id to '.$o{uid});
}
## set rlimit(s)