mirror of
https://github.com/samba-team/samba.git
synced 2025-02-19 21:57:57 +03:00
IFSTEST fixes for open fid, nametoolong.
Jeremy. (This used to be commit e53a81261ed189881c0f07e1b46f97aa6770cab7)
This commit is contained in:
parent
d9a4055174
commit
f744db7a5d
@ -1148,17 +1148,17 @@ struct bitmap {
|
||||
#define FILE_SHARE_DELETE 4
|
||||
|
||||
/* FileAttributesField */
|
||||
#define FILE_ATTRIBUTE_READONLY aRONLY
|
||||
#define FILE_ATTRIBUTE_HIDDEN aHIDDEN
|
||||
#define FILE_ATTRIBUTE_SYSTEM aSYSTEM
|
||||
#define FILE_ATTRIBUTE_DIRECTORY aDIR
|
||||
#define FILE_ATTRIBUTE_ARCHIVE aARCH
|
||||
#define FILE_ATTRIBUTE_NORMAL 0x80L
|
||||
#define FILE_ATTRIBUTE_TEMPORARY 0x100L
|
||||
#define FILE_ATTRIBUTE_SPARSE 0x200L
|
||||
#define FILE_ATTRIBUTE_COMPRESSED 0x800L
|
||||
#define FILE_ATTRIBUTE_NONINDEXED 0x2000L
|
||||
#define SAMBA_ATTRIBUTES_MASK 0x7F
|
||||
#define FILE_ATTRIBUTE_READONLY 0x001L
|
||||
#define FILE_ATTRIBUTE_HIDDEN 0x002L
|
||||
#define FILE_ATTRIBUTE_SYSTEM 0x004L
|
||||
#define FILE_ATTRIBUTE_DIRECTORY 0x010L
|
||||
#define FILE_ATTRIBUTE_ARCHIVE 0x020L
|
||||
#define FILE_ATTRIBUTE_NORMAL 0x080L
|
||||
#define FILE_ATTRIBUTE_TEMPORARY 0x100L
|
||||
#define FILE_ATTRIBUTE_SPARSE 0x200L
|
||||
#define FILE_ATTRIBUTE_COMPRESSED 0x800L
|
||||
#define FILE_ATTRIBUTE_NONINDEXED 0x2000L
|
||||
#define SAMBA_ATTRIBUTES_MASK 0x7F
|
||||
|
||||
/* Flags - combined with attributes. */
|
||||
#define FILE_FLAG_WRITE_THROUGH 0x80000000L
|
||||
@ -1186,6 +1186,7 @@ struct bitmap {
|
||||
#define FILE_EIGHT_DOT_THREE_ONLY 0x0400
|
||||
#define FILE_RANDOM_ACCESS 0x0800
|
||||
#define FILE_DELETE_ON_CLOSE 0x1000
|
||||
#define FILE_OPEN_BY_FILE_ID 0x2000
|
||||
|
||||
/* Responses when opening a file. */
|
||||
#define FILE_WAS_OPENED 1
|
||||
|
@ -45,6 +45,9 @@ const struct unix_error_map unix_dos_nt_errmap[] = {
|
||||
#endif
|
||||
#ifdef EROFS
|
||||
{ EROFS, ERRHRD, ERRnowrite, NT_STATUS_ACCESS_DENIED },
|
||||
#endif
|
||||
#ifdef ENAMETOOLONG
|
||||
{ ENAMETOOLONG, ERRDOS, 206, NT_STATUS_OBJECT_NAME_INVALID },
|
||||
#endif
|
||||
{ 0, 0, 0, NT_STATUS_OK }
|
||||
};
|
||||
|
@ -565,6 +565,12 @@ int reply_ntcreate_and_X(connection_struct *conn,
|
||||
time_t c_time;
|
||||
START_PROFILE(SMBntcreateX);
|
||||
|
||||
DEBUG(10,("reply_ntcreateX: flags = 0x%x, desired_access = 0x%x \
|
||||
file_attributes = 0x%x, share_access = 0x%x, create_disposition = 0x%x \
|
||||
create_options = 0x%x root_dir_fid = 0x%x\n", flags, desired_access, file_attributes,
|
||||
share_access, create_disposition,
|
||||
root_dir_fid, create_options ));
|
||||
|
||||
/* If it's an IPC, use the pipe handler. */
|
||||
|
||||
if (IS_IPC(conn)) {
|
||||
@ -577,6 +583,10 @@ int reply_ntcreate_and_X(connection_struct *conn,
|
||||
}
|
||||
}
|
||||
|
||||
if (create_options & FILE_OPEN_BY_FILE_ID) {
|
||||
END_PROFILE(SMBntcreateX);
|
||||
return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to construct the open_and_X ofun value from the
|
||||
@ -1071,6 +1081,11 @@ static int call_nt_transact_create(connection_struct *conn,
|
||||
root_dir_fid = (uint16)IVAL(params,4);
|
||||
smb_attr = (file_attributes & SAMBA_ATTRIBUTES_MASK);
|
||||
|
||||
if (create_options & FILE_OPEN_BY_FILE_ID) {
|
||||
END_PROFILE(SMBntcreateX);
|
||||
return ERROR_NT(NT_STATUS_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
/*
|
||||
* We need to construct the open_and_X ofun value from the
|
||||
* NT values, as that's what our code is structured to accept.
|
||||
|
Loading…
x
Reference in New Issue
Block a user