diff options
author | Jeremy Allison <jra@samba.org> | 2002-08-19 16:10:27 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2002-08-19 16:10:27 +0000 |
commit | 81eacd926bd1f7054522351e1bd24a2192dcbbc1 (patch) | |
tree | 92465fb947ebf9861a84174bbc6e816e1a355855 | |
parent | 67b4dbd5c9f2665d5e6157b8cd522ebff4b8a4ea (diff) | |
download | samba-81eacd926bd1f7054522351e1bd24a2192dcbbc1.tar.gz samba-81eacd926bd1f7054522351e1bd24a2192dcbbc1.tar.xz samba-81eacd926bd1f7054522351e1bd24a2192dcbbc1.zip |
IFS kit test - don't allow TEMP attribute on directory open.
Jeremy.
-rw-r--r-- | source/smbd/nttrans.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/smbd/nttrans.c b/source/smbd/nttrans.c index cf69dfddb04..13378245959 100644 --- a/source/smbd/nttrans.c +++ b/source/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; /* |