Skip to content

Commit

Permalink
core: set the global sock_uid/gid based on the user/group values
Browse files Browse the repository at this point in the history
- they were left with initial value, more or less being unused
  • Loading branch information
miconda committed Mar 11, 2015
1 parent c6ddf3a commit d7a10e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.c
Expand Up @@ -2301,12 +2301,15 @@ int main(int argc, char** argv)
fprintf(stderr, "bad user name/uid number: -u %s\n", user);
goto error;
}
sock_uid = uid;
sock_gid = gid;
}
if (group){
if (group2gid(&gid, group)<0){
fprintf(stderr, "bad group name/gid number: -u %s\n", group);
goto error;
}
sock_gid = gid;
}
if (fix_all_socket_lists()!=0){
fprintf(stderr, "failed to initialize list addresses\n");
Expand Down

0 comments on commit d7a10e6

Please sign in to comment.