Some patches that help Samba respond more like Windows (based on smbtorture tests run against Server 2008
Andrew Bartlett
abartlet at samba.org
Thu Feb 7 18:22:47 MST 2013
On Thu, 2013-02-07 at 17:08 -0800, Richard Sharpe wrote:
> --- smb.h 2012-06-24 10:21:16.000000000 -0700
> +++ smb.h 2013-02-08 00:12:40.906492891 -0800
> @@ -1083,6 +1083,7 @@
> #define FILE_ATTRIBUTE_VOLUME 0x008L
> #define FILE_ATTRIBUTE_DIRECTORY 0x010L
> #define FILE_ATTRIBUTE_ARCHIVE 0x020L
> +#define FILE_ATTRIBUTE_DEVICE 0x040L
> #define FILE_ATTRIBUTE_NORMAL 0x080L
> #define FILE_ATTRIBUTE_TEMPORARY 0x100L
> #define FILE_ATTRIBUTE_SPARSE 0x200L
>
> --- open.c 2013-02-08 01:02:20.103540281 -0800
> +++ open.c 2013-02-08 00:36:09.626544462 -0800
> @@ -3132,7 +3132,7 @@
> (unsigned int)private_flags,
> ea_list, sd, smb_fname_str_dbg(smb_fname)));
>
> - if (create_options & FILE_OPEN_BY_FILE_ID) {
> + if (create_options & (FILE_OPEN_BY_FILE_ID | 0x100080)) {
> status = NT_STATUS_NOT_SUPPORTED;
> goto fail;
> }
> @@ -3142,6 +3142,18 @@
> goto fail;
> }
>
> + /* Test for these access bits before file attributes */
> + /* Should test for the order of these tests */
> + if (access_mask & 0x0C000000) {
> + status = NT_STATUS_ACCESS_DENIED;
> + goto fail;
> + }
> +
> + if (file_attributes & (FILE_ATTRIBUTE_DEVICE | FILE_ATTRIBUTE_VOLUME)) {
> + status = NT_STATUS_INVALID_PARAMETER;
> + goto fail;
> + }
> +
> if (req == NULL) {
> oplock_request |= INTERNAL_OPEN_ONLY;
> }
This patch looks odd for two reasons:
- First it isn't a git commit
- Second, why do you have these raw bitmasks in the code, rather than
symbolic names?
Andrew Bartlett
--
Andrew Bartlett http://samba.org/~abartlet/
Authentication Developer, Samba Team http://samba.org
More information about the samba-technical
mailing list