diff options
author | Michael Adam <obnox@samba.org> | 2007-05-10 13:31:15 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:21:56 -0500 |
commit | 0aab2a8251fc46fe9f62fb1418a343e93467adf4 (patch) | |
tree | 903b3fd77b10cbf6451afb98003f1c422f39d03a /source3/modules | |
parent | 4c185a6077322ba64231d23dda25a6b6d44d0b12 (diff) | |
download | samba-0aab2a8251fc46fe9f62fb1418a343e93467adf4.tar.gz samba-0aab2a8251fc46fe9f62fb1418a343e93467adf4.tar.bz2 samba-0aab2a8251fc46fe9f62fb1418a343e93467adf4.zip |
r22777: Fix for [Bug 4543] - POSIX ACL support on FreeBSD.
This adds vfs_posixacl to the list of static modules and
makes use of HAVE_ACL_GET_PERM_NP.
This is just a quick fix. FreeBSD acl support is still
hardcoded in configure.in, but actually this could be
detected in a unified test for freebsd, linux, *,
as suggested in the bugreport. This has still to be
checked and elaborated.
Michael
(This used to be commit af94654772f743f0c0b7809ff3f2ef019feb713a)
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_posixacl.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/modules/vfs_posixacl.c b/source3/modules/vfs_posixacl.c index 191c4a7cb0..109c1e20b2 100644 --- a/source3/modules/vfs_posixacl.c +++ b/source3/modules/vfs_posixacl.c @@ -200,9 +200,15 @@ static BOOL smb_ace_to_internal(acl_entry_t posix_ace, return False; } ace->a_perm = 0; +#ifdef HAVE_ACL_GET_PERM_NP + ace->a_perm |= (acl_get_perm_np(permset, ACL_READ) ? SMB_ACL_READ : 0); + ace->a_perm |= (acl_get_perm_np(permset, ACL_WRITE) ? SMB_ACL_WRITE : 0); + ace->a_perm |= (acl_get_perm_np(permset, ACL_EXECUTE) ? SMB_ACL_EXECUTE : 0); +#else ace->a_perm |= (acl_get_perm(permset, ACL_READ) ? SMB_ACL_READ : 0); ace->a_perm |= (acl_get_perm(permset, ACL_WRITE) ? SMB_ACL_WRITE : 0); ace->a_perm |= (acl_get_perm(permset, ACL_EXECUTE) ? SMB_ACL_EXECUTE : 0); +#endif return True; } |