mirror of
https://github.com/samba-team/samba.git
synced 2025-01-25 06:04:04 +03:00
Added Mike Davidsons Tru64 ACL patch.
Jeremy. (This used to be commit 8c5e5f8c84cab4273ca28d6b5f543dd5d5b464fb)
This commit is contained in:
parent
4b2016305b
commit
16afd6d2bc
@ -147,7 +147,7 @@
|
|||||||
#undef HAVE_SOLARIS_ACLS
|
#undef HAVE_SOLARIS_ACLS
|
||||||
#undef HAVE_IRIX_ACLS
|
#undef HAVE_IRIX_ACLS
|
||||||
#undef HAVE_AIX_ACLS
|
#undef HAVE_AIX_ACLS
|
||||||
#undef HAVE_DRAFT13_POSIX_ACLS
|
#undef HAVE_TRU64_ACLS
|
||||||
#undef HAVE_NO_ACLS
|
#undef HAVE_NO_ACLS
|
||||||
#undef HAVE_LIBPAM
|
#undef HAVE_LIBPAM
|
||||||
#undef HAVE_ASPRINTF_DECL
|
#undef HAVE_ASPRINTF_DECL
|
||||||
|
6
source3/configure
vendored
6
source3/configure
vendored
@ -944,7 +944,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
|
|||||||
|
|
||||||
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||||
|
|
||||||
for ac_prog in mawk gawk nawk awk
|
for ac_prog in gawk mawk nawk awk
|
||||||
do
|
do
|
||||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||||
set dummy $ac_prog; ac_word=$2
|
set dummy $ac_prog; ac_word=$2
|
||||||
@ -12349,9 +12349,9 @@ EOF
|
|||||||
|
|
||||||
;;
|
;;
|
||||||
*osf*)
|
*osf*)
|
||||||
echo "$ac_t""Using Draft 13 Posix ACLs" 1>&6
|
echo "$ac_t""Using Tru64 ACLs" 1>&6
|
||||||
cat >> confdefs.h <<\EOF
|
cat >> confdefs.h <<\EOF
|
||||||
#define HAVE_DRAFT13_POSIX_ACLS 1
|
#define HAVE_TRU64_ACLS 1
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
LIBS="$LIBS -lpacl"
|
LIBS="$LIBS -lpacl"
|
||||||
|
@ -2285,8 +2285,8 @@ AC_ARG_WITH(acl-support,
|
|||||||
AC_DEFINE(HAVE_AIX_ACLS)
|
AC_DEFINE(HAVE_AIX_ACLS)
|
||||||
;;
|
;;
|
||||||
*osf*)
|
*osf*)
|
||||||
AC_MSG_RESULT(Using Draft 13 Posix ACLs)
|
AC_MSG_RESULT(Using Tru64 ACLs)
|
||||||
AC_DEFINE(HAVE_DRAFT13_POSIX_ACLS)
|
AC_DEFINE(HAVE_TRU64_ACLS)
|
||||||
LIBS="$LIBS -lpacl"
|
LIBS="$LIBS -lpacl"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -210,7 +210,7 @@
|
|||||||
#undef HAVE_SOLARIS_ACLS
|
#undef HAVE_SOLARIS_ACLS
|
||||||
#undef HAVE_IRIX_ACLS
|
#undef HAVE_IRIX_ACLS
|
||||||
#undef HAVE_AIX_ACLS
|
#undef HAVE_AIX_ACLS
|
||||||
#undef HAVE_DRAFT13_POSIX_ACLS
|
#undef HAVE_TRU64_ACLS
|
||||||
#undef HAVE_NO_ACLS
|
#undef HAVE_NO_ACLS
|
||||||
#undef HAVE_LIBPAM
|
#undef HAVE_LIBPAM
|
||||||
#undef HAVE_ASPRINTF_DECL
|
#undef HAVE_ASPRINTF_DECL
|
||||||
|
@ -54,9 +54,9 @@
|
|||||||
#define SMB_ACL_TYPE_ACCESS ACL_TYPE_ACCESS
|
#define SMB_ACL_TYPE_ACCESS ACL_TYPE_ACCESS
|
||||||
#define SMB_ACL_TYPE_DEFAULT ACL_TYPE_DEFAULT
|
#define SMB_ACL_TYPE_DEFAULT ACL_TYPE_DEFAULT
|
||||||
|
|
||||||
#elif defined(HAVE_DRAFT13_POSIX_ACLS)
|
#elif defined(HAVE_TRU64_ACLS)
|
||||||
|
|
||||||
/* This is for DEC OSF/1 */
|
/* This is for DEC/Compaq Tru64 UNIX */
|
||||||
|
|
||||||
#define SMB_ACL_TAG_T acl_tag_t
|
#define SMB_ACL_TAG_T acl_tag_t
|
||||||
#define SMB_ACL_TYPE_T acl_type_t
|
#define SMB_ACL_TYPE_T acl_type_t
|
||||||
|
@ -191,8 +191,17 @@ int sys_acl_free_qualifier(void *qual, SMB_ACL_TAG_T tagtype)
|
|||||||
return acl_free(qual);
|
return acl_free(qual);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(HAVE_DRAFT13_POSIX_ACLS)
|
#elif defined(HAVE_TRU64_ACLS)
|
||||||
|
/*
|
||||||
|
* The interface to DEC/Compaq Tru64 UNIX ACLs
|
||||||
|
* is based on Draft 13 of the POSIX spec which is
|
||||||
|
* slightly different from the Draft 16 interface.
|
||||||
|
*
|
||||||
|
* Also, some of the permset manipulation functions
|
||||||
|
* such as acl_clear_perm() and acl_add_perm() appear
|
||||||
|
* to be broken on Tru64 so we have to manipulate
|
||||||
|
* the permission bits in the permset directly.
|
||||||
|
*/
|
||||||
int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p)
|
int sys_acl_get_entry( SMB_ACL_T the_acl, int entry_id, SMB_ACL_ENTRY_T *entry_p)
|
||||||
{
|
{
|
||||||
SMB_ACL_ENTRY_T entry;
|
SMB_ACL_ENTRY_T entry;
|
||||||
@ -237,25 +246,26 @@ SMB_ACL_T sys_acl_get_fd(int fd)
|
|||||||
|
|
||||||
int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset)
|
int sys_acl_clear_perms(SMB_ACL_PERMSET_T permset)
|
||||||
{
|
{
|
||||||
return acl_clear_perm(permset);
|
*permset = 0; /* acl_clear_perm() is broken on Tru64 */
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
|
int sys_acl_add_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
|
||||||
{
|
{
|
||||||
return acl_add_perm(permset, perm);
|
if (perm & ~(SMB_ACL_READ | SMB_ACL_WRITE | SMB_ACL_EXECUTE)) {
|
||||||
|
errno = EINVAL;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
*permset |= perm; /* acl_add_perm() is broken on Tru64 */
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
|
int sys_acl_get_perm( SMB_ACL_PERMSET_T permset, SMB_ACL_PERM_T perm)
|
||||||
{
|
{
|
||||||
#if defined(HAVE_ACL_GET_PERM_NP)
|
return *permset & perm; /* Tru64 doesn't have acl_get_perm() */
|
||||||
return acl_get_perm_np(permset, perm);
|
|
||||||
#else
|
|
||||||
/*
|
|
||||||
* if we don't have an acl_get_perm() interface
|
|
||||||
* this will probably work for most implementations
|
|
||||||
*/
|
|
||||||
return *permset & perm;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen)
|
char *sys_acl_to_text( SMB_ACL_T the_acl, ssize_t *plen)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user