[Samba] ACLs fail in 3.0.23d

Jens Nissen jens.nissen at gmx.net
Tue Jan 30 16:42:06 GMT 2007


I have an extf3-filesystem and I am absolutely sure, that Samba is correctly compiled - see the following line from the map-file:

0x00041b24                acl_get_fd@@ACL_1.0
...
0x00041d7c                acl_get_file@@ACL_1.0

As mentioned before:

# /bin/smbd -b | grep -i ACL
   HAVE_SYS_ACL_H
   HAVE_POSIX_ACLS

And in addition: if I call directly "acl_get_file" from Samba, I get a POSIX ACE!!!
This shows IMHO:
- smbd is linked against / loads /boot/lib/libacl.so.1
- the file system has ACLs / ACEs available (also controlled with getfacl / chacl /setfacl)

I traced the log-file for the string "vfs hooks".

There are two places in vfs.c where this string can come from:
- "Initialising default vfs hooks"
- "Initialising custom vfs hooks from [%s]"

I only get the first string. So the vfs_wrapper is initialised by default which (??) is the posix_ace module??? (Can someone confirm this?).

If that is the case, there are a few ways, the wrapper could give wrong results. One is, that a thread is forked and the initializing code is not called. In this case, acl_get_file would not get called. One other reason could be, that some other function gets called as the table is wrong. 
I cannot really tell, as I do not have a gdb on the system running (and I do not really know how to use it as a matter of fact :-( )

Kind regards and thanks for all kinds of help in advance!!!

Jens 

-------- Original-Nachricht --------
Datum: Tue, 30 Jan 2007 10:11:13 -0600
Von: "Gerald (Jerry) Carter" <jerry at samba.org>
An: Jens Nissen <jens.nissen at gmx.net>
Betreff: Re: [Samba] ACLs fail in 3.0.23d

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Jens Nissen wrote:
> 
> > OK - I managed to track down the bug inside Samba, 
> > but I have no easy way to work around it.
> > The dynamic mapping of vfs acls inside Samba does 
> > not seem to work.  See the following sequence in posix_acls.c
> > in function get_nt_acl:
> > 
> > /*
> >  * Get the ACL from the path.
> >  */
> > 
> > posix_acl = SMB_VFS_SYS_ACL_GET_FILE(conn, fsp->fsp_name,
> SMB_ACL_TYPE_ACCESS);
> > 
> > /// My Workaround
> > /// posix_acl equals 0 here
> > if (!posix_acl)
> > {
> >   posix_acl=acl_get_file(fsp->fsp_name, SMB_ACL_TYPE_ACCESS);
> > }
> > /// posix_acl is something else than 0 here
> > /// End My Workaround
> > 
> > While SMB_VFS_SYS_ACL_GET_FILE returns a Null-Pointer, the 
> > call afterwards to acl_get_file does return a ACL description
> > which is non-zero.
> 
> Are you absolutely sure you built with ACL support?
> (--with-acl-support) and that `smbd -b | grep ACL` returns
> the expected result for your platform?  Also what file
> system is this?
> 
> 
> 
> 
> cheers, jerry
> =====================================================================
> Samba                                    ------- http://www.samba.org
> Centeris                         -----------  http://www.centeris.com
> "What man is a man who does not make the world better?"      --Balian
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2.2 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFFv24hIR7qMdg1EfYRAn5AAJ4g43TpD6kfSxk1wgQZnEm1zU/n7QCfRpvT
> DVt4OvndKTXOiVSYUG0FXWg=
> =93u5
> -----END PGP SIGNATURE-----

-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer


More information about the samba mailing list