1718 MacOS X Lion (10.7) Finder access denied
authorGordon Ross <gwr@nexenta.com>
Wed, 09 Nov 2011 18:47:36 -0500
changeset 13541 f84d4672fdbd
parent 13540 060607df0c9d
child 13542 417c34452f03
1718 MacOS X Lion (10.7) Finder access denied Reviewed by: Dan McDonald <[email protected]> Reviewed by: Albert Lee <[email protected]> Reviewed by: Andrew Stormont <[email protected]> Reviewed by: Richard Lowe <[email protected]> Approved by: Eric Schrock <[email protected]>
usr/src/uts/common/fs/smbsrv/smb_common_open.c
--- a/usr/src/uts/common/fs/smbsrv/smb_common_open.c	Tue Nov 08 17:01:06 2011 -0500
+++ b/usr/src/uts/common/fs/smbsrv/smb_common_open.c	Wed Nov 09 18:47:36 2011 -0500
@@ -20,6 +20,7 @@
  */
 
 /*
+ * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  */
 
@@ -59,11 +60,15 @@
  *               FILE_WRITE_ATTRIBUTES, FILE_WRITE_EA, and FILE_APPEND_DATA
  *
  * GENERIC_EXECUTE	STANDARD_RIGHTS_EXECUTE, SYNCHRONIZE, and FILE_EXECUTE.
+ *
+ * Careful, we have to emulate some Windows behavior here.
+ * When requested access == zero, you get READ_CONTROL.
+ * MacOS 10.7 depends on this.
  */
 uint32_t
 smb_access_generic_to_file(uint32_t desired_access)
 {
-	uint32_t access = 0;
+	uint32_t access = READ_CONTROL;
 
 	if (desired_access & GENERIC_ALL)
 		return (FILE_ALL_ACCESS & ~SYNCHRONIZE);