From d94046af25ac288014c92858dc2f9017231ab59a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 19 Aug 2002 16:10:27 +0000 Subject: IFS kit test - don't allow TEMP attribute on directory open. Jeremy. (This used to be commit 81eacd926bd1f7054522351e1bd24a2192dcbbc1) --- source3/smbd/nttrans.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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; /* -- cgit