summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-04-10 19:43:14 +0000
committerJeremy Allison <jra@samba.org>2001-04-10 19:43:14 +0000
commit6d96224f81039756180d496a95b121768953f5ed (patch)
treef6857c0ab69e6eb49f350991e0e6ce9f3afe9acb /source3/rpc_server
parentef1a7311cec15f4444c80b92301de0dec92df288 (diff)
downloadsamba-6d96224f81039756180d496a95b121768953f5ed.tar.gz
samba-6d96224f81039756180d496a95b121768953f5ed.tar.bz2
samba-6d96224f81039756180d496a95b121768953f5ed.zip
passdb/pass_check.c: Ensure second check is done only if given username is all in caps.
rpc_server/srv_srvsvc_nt.c: Added "CONFIGFILE" arg to scripts so path to smb.conf is given. Jeremy. (This used to be commit 3c4c649951464be51541d5890afb997e3ecfcd23)
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index cef31f7a8c..bce5c33225 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -1219,7 +1219,7 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
r_u->switch_value = 0;
- if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$"))
+ if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global"))
return ERROR_ACCESS_DENIED;
snum = find_service(share_name);
@@ -1290,8 +1290,8 @@ uint32 _srv_net_share_set_info(pipes_struct *p, SRV_Q_NET_SHARE_SET_INFO *q_u, S
if (!lp_change_share_cmd() || !*lp_change_share_cmd())
return ERROR_ACCESS_DENIED;
- slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\"",
- lp_change_share_cmd(), share_name, ptr, comment);
+ slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" \"%s\"",
+ lp_change_share_cmd(), CONFIGFILE, share_name, ptr, comment);
dos_to_unix(command, True); /* Convert to unix-codepage */
DEBUG(10,("_srv_net_share_set_info: Running [%s]\n", command ));
@@ -1385,6 +1385,9 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
return NT_STATUS_INVALID_INFO_CLASS;
}
+ if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global"))
+ return ERROR_ACCESS_DENIED;
+
snum = find_service(share_name);
/* Share already exists. */
@@ -1404,8 +1407,8 @@ uint32 _srv_net_share_add(pipes_struct *p, SRV_Q_NET_SHARE_ADD *q_u, SRV_R_NET_S
string_replace(ptr, '"', ' ');
string_replace(comment, '"', ' ');
- slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\"",
- lp_add_share_cmd(), share_name, ptr, comment);
+ slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\" \"%s\" \"%s\"",
+ lp_add_share_cmd(), CONFIGFILE, share_name, ptr, comment);
dos_to_unix(command, True); /* Convert to unix-codepage */
DEBUG(10,("_srv_net_share_add: Running [%s]\n", command ));
@@ -1451,7 +1454,7 @@ uint32 _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_S
unistr2_to_ascii(share_name, &q_u->uni_share_name, sizeof(share_name));
- if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$"))
+ if (strequal(share_name,"IPC$") || strequal(share_name,"ADMIN$") || strequal(share_name,"global"))
return ERROR_ACCESS_DENIED;
snum = find_service(share_name);
@@ -1471,7 +1474,8 @@ uint32 _srv_net_share_del(pipes_struct *p, SRV_Q_NET_SHARE_DEL *q_u, SRV_R_NET_S
if (!lp_delete_share_cmd() || !*lp_delete_share_cmd())
return ERROR_ACCESS_DENIED;
- slprintf(command, sizeof(command)-1, "%s \"%s\"", lp_delete_share_cmd(), lp_servicename(snum));
+ slprintf(command, sizeof(command)-1, "%s \"%s\" \"%s\"",
+ lp_delete_share_cmd(), CONFIGFILE, lp_servicename(snum));
dos_to_unix(command, True); /* Convert to unix-codepage */
DEBUG(10,("_srv_net_share_del: Running [%s]\n", command ));