diff options
author | Jeremy Allison <jra@samba.org> | 2001-10-18 20:15:12 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-10-18 20:15:12 +0000 |
commit | c416ff851b4ecc7a44aee9d00d07dd481d8ae2a7 (patch) | |
tree | a663818999f244e52704caab9906b7857edce355 /source3/smbd/process.c | |
parent | 9a903a08a7c4f8407b4d6d0937f0bfda932d2ce3 (diff) | |
download | samba-c416ff851b4ecc7a44aee9d00d07dd481d8ae2a7.tar.gz samba-c416ff851b4ecc7a44aee9d00d07dd481d8ae2a7.tar.bz2 samba-c416ff851b4ecc7a44aee9d00d07dd481d8ae2a7.zip |
Merge the become_XXX -> change_to_XXX fixes from 2.2.2 to HEAD.
Ensure make_conection() can only be called as root.
Jeremy.
(This used to be commit 8d23a7441b4687458ee021bfe8880558506eddba)
Diffstat (limited to 'source3/smbd/process.c')
-rw-r--r-- | source3/smbd/process.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/smbd/process.c b/source3/smbd/process.c index cf691ce9f3..edcb6b345f 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -120,7 +120,7 @@ static void async_processing(fd_set *fds, char *buffer, int buffer_len) /* check for sighup processing */ if (reload_after_sighup) { - unbecome_user(); + change_to_root_user(); DEBUG(1,("Reloading services after SIGHUP\n")); reload_services(False); reload_after_sighup = False; @@ -702,7 +702,7 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize /* does this protocol need to be run as root? */ if (!(flags & AS_USER)) - unbecome_user(); + change_to_root_user(); /* does this protocol need a valid tree connection? */ if ((flags & AS_USER) && !conn) { @@ -711,7 +711,7 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize /* does this protocol need to be run as the connected user? */ - if ((flags & AS_USER) && !become_user(conn,session_tag)) { + if ((flags & AS_USER) && !change_to_user(conn,session_tag)) { if (flags & AS_GUEST) flags &= ~AS_USER; else @@ -734,13 +734,13 @@ static int switch_message(int type,char *inbuf,char *outbuf,int size,int bufsize } /* load service specific parameters */ - if (conn && !become_service(conn,(flags & AS_USER)?True:False)) { + if (conn && !set_current_service(conn,(flags & AS_USER)?True:False)) { return(ERROR_DOS(ERRSRV,ERRaccess)); } /* does this protocol need to be run as guest? */ if ((flags & AS_GUEST) && - (!become_guest() || + (!change_to_guest() || !check_access(smbd_server_fd(), lp_hostsallow(-1), lp_hostsdeny(-1)))) { return(ERROR_DOS(ERRSRV,ERRaccess)); } @@ -1096,7 +1096,7 @@ static BOOL timeout_processing(int deadtime, int *select_timeout, time_t *last_t last_idle_closed_check = t; /* become root again if waiting */ - unbecome_user(); + change_to_root_user(); /* check if we need to reload services */ check_reload(t); |