summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-10-14 14:51:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:04:59 -0500
commitb9ae4455fd0be70c6c7b08807425066e0dd91242 (patch)
tree5f8b232a4ff92b6c61ae4b04b9713eb5985ea3ee /source3
parenta1eb5255042c3ff246e27a3cd3cdfd869c5542d3 (diff)
downloadsamba-b9ae4455fd0be70c6c7b08807425066e0dd91242.tar.gz
samba-b9ae4455fd0be70c6c7b08807425066e0dd91242.tar.bz2
samba-b9ae4455fd0be70c6c7b08807425066e0dd91242.zip
r11054: patch from Brian Moran; fix error code return in _srv_net_name_validate()
(This used to be commit b4e78520ccb8c896a52e3f3e7a52e19e3b2c33bf)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c23
1 files changed, 5 insertions, 18 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 9643b2a724..1022cb960d 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -2275,31 +2275,18 @@ WERROR _srv_net_disk_enum(pipes_struct *p, SRV_Q_NET_DISK_ENUM *q_u, SRV_R_NET_D
WERROR _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV_R_NET_NAME_VALIDATE *r_u)
{
- int snum;
fstring share_name;
- r_u->status=WERR_OK;
-
- switch(q_u->type) {
-
+ switch ( q_u->type ) {
case 0x9:
-
- /*check if share name is ok*/
- /*also check if we already have a share with this name*/
+ /* check if share name is ok.
+ TODO: check for invalid characters in name? */
unistr2_to_ascii(share_name, &q_u->uni_name, sizeof(share_name));
- snum = find_service(share_name);
-
- /* Share already exists. */
- if (snum >= 0)
- r_u->status = WERR_ALREADY_EXISTS;
break;
-
default:
- /*unsupported type*/
- r_u->status = WERR_UNKNOWN_LEVEL;
- break;
+ return WERR_UNKNOWN_LEVEL;
}
- return r_u->status;
+ return WERR_OK;
}