summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-07-28 22:42:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:24 -0500
commita093a76dc14303fd1c42fb2c0b87faf3748815e4 (patch)
tree6fbf13185fc81ebaa429e9e47a7724109b2f3983 /source3/rpc_server
parent321b0a3a63b40f779c71d476fdc5a840d2ced665 (diff)
downloadsamba-a093a76dc14303fd1c42fb2c0b87faf3748815e4.tar.gz
samba-a093a76dc14303fd1c42fb2c0b87faf3748815e4.tar.bz2
samba-a093a76dc14303fd1c42fb2c0b87faf3748815e4.zip
r17293: After the results from the cluster tests in Germany,
fix the messaging code to call the efficient calls : save_re_uid() set_effective_uid(0); messaging_op restore_re_uid(); instead of using heavyweight become_root()/unbecome_root() pairs around all messaging code. Fixup the messaging code to ensure sec_init() is called (only once) so that non-root processes still work when sending messages. This is a lighter weight solution to become_root()/unbecome_root() (which swaps all the supplemental groups) and should be more efficient. I will migrate all server code over to using this (a similar technique should be used in the passdb backend where needed). Jeremy. (This used to be commit 4ace291278d9a44f5c577bdd3b282c1231e543df)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index e4e5bde215..de3148aae8 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -1303,7 +1303,6 @@ WERROR _srv_net_sess_del(pipes_struct *p, SRV_Q_NET_SESS_DEL *q_u, SRV_R_NET_SES
int num_sessions, snum;
fstring username;
fstring machine;
- BOOL not_root = False;
rpcstr_pull_unistr2_fstring(username, &q_u->uni_user_name);
rpcstr_pull_unistr2_fstring(machine, &q_u->uni_cli_name);
@@ -1332,16 +1331,8 @@ WERROR _srv_net_sess_del(pipes_struct *p, SRV_Q_NET_SESS_DEL *q_u, SRV_R_NET_SES
if ((strequal(session_list[snum].username, username) || username[0] == '\0' ) &&
strequal(session_list[snum].remote_machine, machine)) {
- if (p->pipe_user.ut.uid != sec_initial_uid()) {
- not_root = True;
- become_root();
- }
-
if (message_send_pid(pid_to_procid(session_list[snum].pid), MSG_SHUTDOWN, NULL, 0, False))
r_u->status = WERR_OK;
-
- if (not_root)
- unbecome_root();
}
}