summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-07-18 07:07:29 +0000
committerAndrew Tridgell <tridge@samba.org>2003-07-18 07:07:29 +0000
commit5e252c86bd97305f3c6578afb29ccd148f985e60 (patch)
treee880e71035cafead9e24f7fee34564d169bf01c7
parent14f3c7507020d77bc92ae00614b6af8f24784925 (diff)
downloadsamba-5e252c86bd97305f3c6578afb29ccd148f985e60.tar.gz
samba-5e252c86bd97305f3c6578afb29ccd148f985e60.tar.bz2
samba-5e252c86bd97305f3c6578afb29ccd148f985e60.zip
make sure we don't allow the creation of directories containing
wildcard characters. I've only put this in mkdir at the moment, but I suspect this will apply to all places that can create new filenames. We need to allow the opening of existing filenames that contain wildcards, but not allow the creation of new ones. (This used to be commit 2fd5569938b8970f3e9d761eecad5bc0b8bb267e)
-rw-r--r--source3/smbd/reply.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 44633b1db6..5f3d6fa10e 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -2836,7 +2836,11 @@ NTSTATUS mkdir_internal(connection_struct *conn, pstring directory)
int ret= -1;
unix_convert(directory,conn,0,&bad_path,&sbuf);
-
+
+ if (ms_has_wild(directory)) {
+ return NT_STATUS_OBJECT_NAME_INVALID;
+ }
+
if (check_name(directory, conn))
ret = vfs_MkDir(conn,directory,unix_mode(conn,aDIR,directory));