[OpenIndiana-discuss] no permission to access oi_148 CIFS shares from Lion Finder

Yuri Pankov yuri.pankov at gmail.com
Wed Sep 5 11:14:56 UTC 2012


On Wed, 05 Sep 2012 03:37:16 -0700, Martin Frost wrote:
> Our users running Lion have a major access problem with CIFS shares
> on an oi_148 machine.  The Finder is unable (or unwilling) to open
> subdirectories of the share's top level.
>
> The problem seems to be only in the Finder, since other programs
> (e.g., Terminal or Pages) can navigate down through the CIFS tree.
> For that matter, the Finder can access *files* in the top level, just
> not subdirectories; for instance, QuickLook works on top-level files.
>
> I don't know if this is really a Finder bug or a OI bug (or both), but
> I've read that it was fixed in Nexenta before the end of November
> 2011.
>
> Has this problem been fixed in OI?  Any chance for a fix in oi_148?
>
> Thanks,
> Martin
>
> P.S. I just read of a strange "temporary" workaround, though I haven't had
> a chance to test it.  It's in the post by notpeter on this page:
>
>    https://discussions.apple.com/thread/3193468?start=30&tstart=0
>
> It'd be nice if our users didn't have to use that workaround to
> access oi_148 files from the Finder in Lion.

This should be fixed in illumos:

changeset:   13513:f84d4672fdbd
user:        Gordon Ross <gwr at nexenta.com>
date:        Wed Nov 09 18:47:36 2011 -0500
description:
         1718 MacOS X Lion (10.7) Finder access denied
         Reviewed by: Dan McDonald <danmcd at nexenta.com>
         Reviewed by: Albert Lee <trisk at nexenta.com>
         Reviewed by: Andrew Stormont <Andrew.Stormont at nexenta.com>
         Reviewed by: Richard Lowe <richlowe at richlowe.net>
         Approved by: Eric Schrock <eric.schrock at delphix.com>

and should be available in the latest OI release (oi151a5, probably). 
The fix itself is pretty simple (attached).
-------------- next part --------------
changeset:   13513:f84d4672fdbd
user:        Gordon Ross <gwr at nexenta.com>
date:        Wed Nov 09 18:47:36 2011 -0500
description:
	1718 MacOS X Lion (10.7) Finder access denied
	Reviewed by: Dan McDonald <danmcd at nexenta.com>
	Reviewed by: Albert Lee <trisk at nexenta.com>
	Reviewed by: Andrew Stormont <Andrew.Stormont at nexenta.com>
	Reviewed by: Richard Lowe <richlowe at richlowe.net>
	Approved by: Eric Schrock <eric.schrock at delphix.com>

diff -r 060607df0c9d -r f84d4672fdbd 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);


More information about the OpenIndiana-discuss mailing list