Skip to content

Commit

Permalink
ctl: use uid/gid from the core if not set for the module
Browse files Browse the repository at this point in the history
- otherwise it cannot do clean created files at shut down

(cherry picked from commit 3b5633d)
  • Loading branch information
miconda committed Apr 1, 2015
1 parent b2084ee commit e1d18d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions modules/ctl/ctl.c
Expand Up @@ -277,6 +277,9 @@ static int mod_init(void)
goto error;
}
}
/* get the uid/gid from core if not set for the module */
if(usock_uid==-1 && sock_uid!=-1) usock_uid = sock_uid;
if(usock_gid==-1 && sock_gid!=-1) usock_gid = sock_gid;
/* open socket now, before suid */
if (init_ctrl_sockets(&ctrl_sock_lst, listen_lst, DEFAULT_CTL_PORT,
usock_mode, usock_uid, usock_gid)<0){
Expand Down

0 comments on commit e1d18d0

Please sign in to comment.