summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-03-24 14:40:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:17 -0500
commit987fd2ed97b91804646b8d93fff37d7f2efa6bab (patch)
treeae86d11621f08cc5f68538d9af0d41c090956e0a /source3/rpc_server
parentabde8c438da60d054b8ed0c7b087e4673e63ae13 (diff)
downloadsamba-987fd2ed97b91804646b8d93fff37d7f2efa6bab.tar.gz
samba-987fd2ed97b91804646b8d93fff37d7f2efa6bab.tar.bz2
samba-987fd2ed97b91804646b8d93fff37d7f2efa6bab.zip
r6037: little cleanup of unused vars and unnecessary codepaths
(This used to be commit 167f7d3caa84e612cf3af0095536734dc7c3ad29)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index ed08f185f7..a71f0f1c29 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -1360,8 +1360,6 @@ WERROR _srv_net_sess_del(pipes_struct *p, SRV_Q_NET_SESS_DEL *q_u, SRV_R_NET_SES
fstring username;
fstring machine;
BOOL not_root = False;
- /* SE_PRIV se_diskop = SE_DISK_OPERATOR; / * Is disk op appropriate here ? JRA. * /
- BOOL is_disk_op = False; / * No. SSS. :) */
rpcstr_pull_unistr2_fstring(username, &q_u->uni_user_name);
rpcstr_pull_unistr2_fstring(machine, &q_u->uni_cli_name);
@@ -1375,13 +1373,12 @@ WERROR _srv_net_sess_del(pipes_struct *p, SRV_Q_NET_SESS_DEL *q_u, SRV_R_NET_SES
DEBUG(5,("_srv_net_sess_del: %d\n", __LINE__));
- /* is_disk_op = user_has_privileges( p->pipe_user.nt_user_token, &se_diskop ); */
-
r_u->status = WERR_ACCESS_DENIED;
get_current_user(&user, p);
- /* fail out now if you are not root */
- /* or at least domain admins */
+
+ /* fail out now if you are not root or not a domain admin */
+
if ((user.uid != sec_initial_uid()) &&
( ! nt_token_check_domain_rid(p->pipe_user.nt_user_token, DOMAIN_GROUP_RID_ADMINS))) {
@@ -1397,14 +1394,12 @@ WERROR _srv_net_sess_del(pipes_struct *p, SRV_Q_NET_SESS_DEL *q_u, SRV_R_NET_SES
not_root = True;
become_root();
}
- if ((ret = message_send_pid(session_list[snum].pid, MSG_SHUTDOWN, NULL, 0, False))) {
+
+ if ((ret = message_send_pid(session_list[snum].pid, MSG_SHUTDOWN, NULL, 0, False)))
r_u->status = WERR_OK;
- } else {
- r_u->status = WERR_ACCESS_DENIED;
- }
- if (not_root) {
+
+ if (not_root)
unbecome_root();
- }
}
}