svn commit: samba r6037 - in branches/SAMBA_3_0/source/rpc_server: .
jerry at samba.org
jerry at samba.org
Thu Mar 24 14:40:37 GMT 2005
Author: jerry
Date: 2005-03-24 14:40:35 +0000 (Thu, 24 Mar 2005)
New Revision: 6037
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=6037
Log:
little cleanup of unused vars and unnecessary codepaths
Modified:
branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
Changeset:
Modified: branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c
===================================================================
--- branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c 2005-03-24 14:39:55 UTC (rev 6036)
+++ branches/SAMBA_3_0/source/rpc_server/srv_srvsvc_nt.c 2005-03-24 14:40:35 UTC (rev 6037)
@@ -1360,8 +1360,6 @@
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 @@
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 @@
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();
- }
}
}
More information about the samba-cvs
mailing list