summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-01-13 21:22:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:07 -0500
commit005c88054f526d9a14d748b665cd6b4853e60a35 (patch)
tree2e880ba6e90d40438edd6fbd51d731b78cded9c9 /source3
parentbb59be3e0d2687fd2a59e831f7efdb34e5ee5d3d (diff)
downloadsamba-005c88054f526d9a14d748b665cd6b4853e60a35.tar.gz
samba-005c88054f526d9a14d748b665cd6b4853e60a35.tar.bz2
samba-005c88054f526d9a14d748b665cd6b4853e60a35.zip
r12916: use rpcstr_pull() instead of unistr_to_ascii() when validating share names
(This used to be commit c08bc30698eac2f3f5dd8257b4fd7c3e23e6de39)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c10
-rw-r--r--source3/smbd/uid.c2
2 files changed, 4 insertions, 8 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 090aa4c9ff..230f062662 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -1,5 +1,5 @@
- /*
- * Unix SMB/CIFS implementation.
+/*
+ * Unix SMB/CIFS implementation.
* RPC Pipe client / server routines
* Copyright (C) Andrew Tridgell 1992-1997,
* Copyright (C) Jeremy Allison 2001.
@@ -2312,11 +2312,7 @@ WERROR _srv_net_name_validate(pipes_struct *p, SRV_Q_NET_NAME_VALIDATE *q_u, SRV
switch ( q_u->type ) {
case 0x9:
- /* Run the name through alpha_strcpy() to remove any unsafe
- shell characters. Compare the copied string with the original
- and fail if the strings don't match */
-
- unistr2_to_ascii(sharename, &q_u->uni_name, sizeof(sharename));
+ rpcstr_pull(sharename, q_u->uni_name.buffer, sizeof(sharename), q_u->uni_name.uni_str_len*2, 0);
if ( !validate_net_name( sharename, INVALID_SHARENAME_CHARS, sizeof(sharename) ) ) {
DEBUG(5,("_srv_net_name_validate: Bad sharename \"%s\"\n", sharename));
return WERR_INVALID_NAME;
diff --git a/source3/smbd/uid.c b/source3/smbd/uid.c
index 458eb3a2c8..9db3d97ab2 100644
--- a/source3/smbd/uid.c
+++ b/source3/smbd/uid.c
@@ -190,7 +190,7 @@ static BOOL check_user_ok(connection_struct *conn, user_struct *vuser,int snum)
/****************************************************************************
Become the user of a connection number without changing the security context
- stack, but modify the currnet_user entries.
+ stack, but modify the current_user entries.
****************************************************************************/
BOOL change_to_user(connection_struct *conn, uint16 vuid)