1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

Fixed typo with acl_set_fd() not needing an ACL_TYPE_T parameter.

Ensure HAVE_NO_ACLS is set in configure if ACL support not selected.
Jeremy
(This used to be commit 523c919356)
This commit is contained in:
Jeremy Allison 2001-01-11 23:41:33 +00:00
parent ea1e6f9e7b
commit cffc311b8a
7 changed files with 22 additions and 15 deletions

View File

@ -138,3 +138,4 @@
#undef MIPS_SPINLOCKS #undef MIPS_SPINLOCKS
#undef POWERPC_SPINLOCKS #undef POWERPC_SPINLOCKS
#undef HAVE_POSIX_ACLS #undef HAVE_POSIX_ACLS
#undef HAVE_NO_ACLS

16
source3/configure vendored
View File

@ -923,7 +923,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
@ -1820,7 +1820,7 @@ for ac_kw in inline __inline__ __inline; do
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
} int $ac_kw foo() { } $ac_kw foo() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
@ -2961,7 +2961,7 @@ else
int main() { int main() {
/* Ultrix mips cc rejects this. */ /* Ultrix mips cc rejects this. */
typedef int charset[2]; const charset x = {0,0}; typedef int charset[2]; const charset x;
/* SunOS 4.1.1 cc rejects this. */ /* SunOS 4.1.1 cc rejects this. */
char const *const *ccp; char const *const *ccp;
char **p; char **p;
@ -3036,7 +3036,7 @@ for ac_kw in inline __inline__ __inline; do
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
} int $ac_kw foo() { } $ac_kw foo() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:3043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:3043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
@ -11565,6 +11565,10 @@ fi
;; ;;
*) *)
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_NO_ACLS 1
EOF
;; ;;
esac esac
else else
@ -11578,11 +11582,11 @@ if test "$cross_compiling" = yes; then
: :
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 11582 "configure" #line 11586 "configure"
#include "confdefs.h" #include "confdefs.h"
#include "${srcdir-.}/tests/summary.c" #include "${srcdir-.}/tests/summary.c"
EOF EOF
if { (eval echo configure:11586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:11590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
echo "configure OK"; echo "configure OK";
else else

View File

@ -1946,6 +1946,7 @@ fi
;; ;;
*) *)
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
AC_DEFINE(HAVE_NO_ACLS)
;; ;;
esac ], esac ],
AC_MSG_RESULT(no) AC_MSG_RESULT(no)

View File

@ -201,6 +201,7 @@
#undef MIPS_SPINLOCKS #undef MIPS_SPINLOCKS
#undef POWERPC_SPINLOCKS #undef POWERPC_SPINLOCKS
#undef HAVE_POSIX_ACLS #undef HAVE_POSIX_ACLS
#undef HAVE_NO_ACLS
/* The number of bytes in a int. */ /* The number of bytes in a int. */
#undef SIZEOF_INT #undef SIZEOF_INT

View File

@ -249,7 +249,7 @@ int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual);
int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
int sys_acl_valid( SMB_ACL_T theacl ); int sys_acl_valid( SMB_ACL_T theacl );
int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
int sys_acl_set_fd( int fd, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); int sys_acl_set_fd( int fd, SMB_ACL_T theacl);
int sys_acl_free_text(char *text); int sys_acl_free_text(char *text);
int sys_acl_free_acl(SMB_ACL_T the_acl) ; int sys_acl_free_acl(SMB_ACL_T the_acl) ;
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);
@ -270,7 +270,7 @@ int sys_acl_set_qualifier( SMB_ACL_ENTRY_T entry, void *qual);
int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset); int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset);
int sys_acl_valid( SMB_ACL_T theacl ); int sys_acl_valid( SMB_ACL_T theacl );
int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl);
int sys_acl_set_fd( int fd, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl); int sys_acl_set_fd( int fd, SMB_ACL_T theacl);
int sys_acl_free_acl(SMB_ACL_T the_acl) ; int sys_acl_free_acl(SMB_ACL_T the_acl) ;
/*The following definitions come from lib/system.c */ /*The following definitions come from lib/system.c */

View File

@ -46,7 +46,7 @@ extern int DEBUGLEVEL;
int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset) int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset)
int sys_acl_valid( SMB_ACL_T theacl ) int sys_acl_valid( SMB_ACL_T theacl )
int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
int sys_acl_set_fd( int fd, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) int sys_acl_set_fd( int fd, SMB_ACL_T theacl)
This next one is not POSIX complient - but we *have* to have it ! This next one is not POSIX complient - but we *have* to have it !
More POSIX braindamage. More POSIX braindamage.
@ -147,7 +147,7 @@ int sys_acl_set_permset( SMB_ACL_ENTRY_T entry, SMB_ACL_PERMSET_T permset)
int sys_acl_valid( SMB_ACL_T theacl ) int sys_acl_valid( SMB_ACL_T theacl )
{ {
return acl_valid(thacl); return acl_valid(theacl);
} }
int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
@ -155,9 +155,9 @@ int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
return acl_set_file(name, acltype, theacl); return acl_set_file(name, acltype, theacl);
} }
int sys_acl_set_fd( int fd, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) int sys_acl_set_fd( int fd, SMB_ACL_T theacl)
{ {
return acl_set_fd(fd, acltype, theacl); return acl_set_fd(fd, theacl);
} }
int sys_acl_free_text(char *text) int sys_acl_free_text(char *text)
@ -266,7 +266,7 @@ int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
return -1; return -1;
} }
int sys_acl_set_fd( int fd, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl) int sys_acl_set_fd( int fd, SMB_ACL_T theacl)
{ {
return -1; return -1;
} }

View File

@ -933,14 +933,14 @@ static BOOL set_canon_ace_list(files_struct *fsp, canon_ace *the_ace, BOOL defau
* Finally apply it to the file or directory. * Finally apply it to the file or directory.
*/ */
if(fsp->is_directory || fsp->fd == -1) { if(default_ace || fsp->is_directory || fsp->fd == -1) {
if (sys_acl_set_file(fsp->fsp_name, the_acl_type, the_acl) == -1) { if (sys_acl_set_file(fsp->fsp_name, the_acl_type, the_acl) == -1) {
DEBUG(0,("set_canon_ace_list: sys_acl_set_file failed for file %s (%s).\n", DEBUG(0,("set_canon_ace_list: sys_acl_set_file failed for file %s (%s).\n",
fsp->fsp_name, strerror(errno) )); fsp->fsp_name, strerror(errno) ));
goto done; goto done;
} }
} else { } else {
if (sys_acl_set_fd(fsp->fd, the_acl_type, the_acl) == -1) { if (sys_acl_set_fd(fsp->fd, the_acl) == -1) {
DEBUG(0,("set_canon_ace_list: sys_acl_set_file failed for file %s (%s).\n", DEBUG(0,("set_canon_ace_list: sys_acl_set_file failed for file %s (%s).\n",
fsp->fsp_name, strerror(errno) )); fsp->fsp_name, strerror(errno) ));
goto done; goto done;