From 0eca33bbf620678759bbe39efaa74f33f96efb74 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 29 Apr 2011 11:57:02 +1000 Subject: s3-smb Use FILE_ATTRIBUTE_DIRECTORY intead of aDIR This means we use just one constant for this file attribute. Andrew Bartlett --- source3/modules/onefs_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/modules/onefs_open.c') diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c index 80f799ca6f..9cd831ce2d 100644 --- a/source3/modules/onefs_open.c +++ b/source3/modules/onefs_open.c @@ -1482,7 +1482,7 @@ static NTSTATUS onefs_open_directory(connection_struct *conn, mode = (mode_t)(file_attributes & ~FILE_FLAG_POSIX_SEMANTICS); file_attributes = 0; } else { - mode = unix_mode(conn, aDIR, smb_dname, parent_dir); + mode = unix_mode(conn, FILE_ATTRIBUTE_DIRECTORY, smb_dname, parent_dir); } /* -- cgit From 0520da2bbe246c45d89bfdec0d399862ecb867ba Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 29 Apr 2011 12:00:57 +1000 Subject: s3-smb Use FILE_ATTRIBUTE_ARCHIVE intead of aARCH This means we use just one constant for this file attribute. Andrew Bartlett --- source3/modules/onefs_open.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/modules/onefs_open.c') diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c index 9cd831ce2d..6ab47d739b 100644 --- a/source3/modules/onefs_open.c +++ b/source3/modules/onefs_open.c @@ -498,9 +498,9 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn, unx_mode = (mode_t)(new_dos_attributes & ~FILE_FLAG_POSIX_SEMANTICS); new_dos_attributes = 0; } else { - /* We add aARCH to this as this mode is only used if the file is + /* We add FILE_ATTRIBUTE_ARCHIVE to this as this mode is only used if the file is * created new. */ - unx_mode = unix_mode(conn, new_dos_attributes | aARCH, + unx_mode = unix_mode(conn, new_dos_attributes | FILE_ATTRIBUTE_ARCHIVE, smb_fname, parent_dir); } @@ -587,7 +587,7 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn, /* Setup dos_attributes to be set by ifs_createfile */ if (lp_store_dos_attributes(SNUM(conn))) { - createfile_attributes = (new_dos_attributes | aARCH) & + createfile_attributes = (new_dos_attributes | FILE_ATTRIBUTE_ARCHIVE) & ~(FILE_ATTRIBUTE_NONINDEXED | FILE_ATTRIBUTE_COMPRESSED); } -- cgit From fe21bdc43c0aeacfc8592998e6a90f6f83c939e0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 16 May 2011 10:41:51 -0700 Subject: Ensure we always write the correct incoming mid into the share mode table entries. --- source3/modules/onefs_open.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/modules/onefs_open.c') diff --git a/source3/modules/onefs_open.c b/source3/modules/onefs_open.c index 6ab47d739b..101dc5bc6e 100644 --- a/source3/modules/onefs_open.c +++ b/source3/modules/onefs_open.c @@ -1310,7 +1310,8 @@ NTSTATUS onefs_open_file_ntcreate(connection_struct *conn, new_file_created = True; } - set_share_mode(lck, fsp, get_current_uid(conn), 0, + set_share_mode(lck, fsp, get_current_uid(conn), + req ? req->mid : 0, fsp->oplock_type); /* Handle strange delete on close create semantics. */ @@ -1666,7 +1667,8 @@ static NTSTATUS onefs_open_directory(connection_struct *conn, return NT_STATUS_DELETE_PENDING; } - set_share_mode(lck, fsp, get_current_uid(conn), 0, NO_OPLOCK); + set_share_mode(lck, fsp, get_current_uid(conn), + req ? req->mid : 0, NO_OPLOCK); /* * For directories the delete on close bit at open time seems -- cgit