summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2002-08-19 16:10:27 +0000
committerJeremy Allison <jra@samba.org>2002-08-19 16:10:27 +0000
commitd94046af25ac288014c92858dc2f9017231ab59a (patch)
treefb9a3a259fb784830fafd7be34c7c064e57146c2
parente6873a8f7f4a0bccb0bf9a9baf1a9933c7ee2eb3 (diff)
downloadsamba-d94046af25ac288014c92858dc2f9017231ab59a.tar.gz
samba-d94046af25ac288014c92858dc2f9017231ab59a.tar.bz2
samba-d94046af25ac288014c92858dc2f9017231ab59a.zip
IFS kit test - don't allow TEMP attribute on directory open.
Jeremy. (This used to be commit 81eacd926bd1f7054522351e1bd24a2192dcbbc1)
-rw-r--r--source3/smbd/nttrans.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index cf69dfddb0..1337824595 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -689,6 +689,12 @@ int reply_ntcreate_and_X(connection_struct *conn,
if(create_options & FILE_DIRECTORY_FILE) {
oplock_request = 0;
+ /* Can't open a temp directory. IFS kit test. */
+ if (file_attributes & FILE_ATTRIBUTE_TEMPORARY) {
+ END_PROFILE(SMBntcreateX);
+ return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
+ }
+
fsp = open_directory(conn, fname, &sbuf, desired_access, smb_open_mode, smb_ofun, unixmode, &smb_action);
restore_case_semantics(file_attributes);
@@ -1161,6 +1167,12 @@ static int call_nt_transact_create(connection_struct *conn,
if(create_options & FILE_DIRECTORY_FILE) {
+ /* Can't open a temp directory. IFS kit test. */
+ if (file_attributes & FILE_ATTRIBUTE_TEMPORARY) {
+ END_PROFILE(SMBntcreateX);
+ return ERROR_NT(NT_STATUS_INVALID_PARAMETER);
+ }
+
oplock_request = 0;
/*