summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-01-11 23:41:33 +0000
committerJeremy Allison <jra@samba.org>2001-01-11 23:41:33 +0000
commitcffc311b8a897641166728f27464ba7d37a2092c (patch)
tree35a337d4fea2f16407bf76502dfb972ccc93efba /source3
parentea1e6f9e7bc845ddf93a1603d7e43050be0e7917 (diff)
downloadsamba-cffc311b8a897641166728f27464ba7d37a2092c.tar.gz
samba-cffc311b8a897641166728f27464ba7d37a2092c.tar.bz2
samba-cffc311b8a897641166728f27464ba7d37a2092c.zip
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 523c91935621ec2d200a79385046694806f7c837)
Diffstat (limited to 'source3')
-rw-r--r--source3/acconfig.h1
-rwxr-xr-xsource3/configure16
-rw-r--r--source3/configure.in1
-rw-r--r--source3/include/config.h.in1
-rw-r--r--source3/include/proto.h4
-rw-r--r--source3/lib/sysacls.c10
-rw-r--r--source3/smbd/posix_acls.c4
7 files changed, 22 insertions, 15 deletions
diff --git a/source3/acconfig.h b/source3/acconfig.h
index 9100add63a..7656aa898f 100644
--- a/source3/acconfig.h
+++ b/source3/acconfig.h
@@ -138,3 +138,4 @@
#undef MIPS_SPINLOCKS
#undef POWERPC_SPINLOCKS
#undef HAVE_POSIX_ACLS
+#undef HAVE_NO_ACLS
diff --git a/source3/configure b/source3/configure
index 8248a92944..105f82f26d 100755
--- a/source3/configure
+++ b/source3/configure
@@ -923,7 +923,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
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
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
@@ -1820,7 +1820,7 @@ for ac_kw in inline __inline__ __inline; do
#include "confdefs.h"
int main() {
-} int $ac_kw foo() {
+} $ac_kw foo() {
; return 0; }
EOF
if { (eval echo configure:1827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
@@ -2961,7 +2961,7 @@ else
int main() {
/* 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. */
char const *const *ccp;
char **p;
@@ -3036,7 +3036,7 @@ for ac_kw in inline __inline__ __inline; do
#include "confdefs.h"
int main() {
-} int $ac_kw foo() {
+} $ac_kw foo() {
; return 0; }
EOF
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
+ cat >> confdefs.h <<\EOF
+#define HAVE_NO_ACLS 1
+EOF
+
;;
esac
else
@@ -11578,11 +11582,11 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 11582 "configure"
+#line 11586 "configure"
#include "confdefs.h"
#include "${srcdir-.}/tests/summary.c"
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
echo "configure OK";
else
diff --git a/source3/configure.in b/source3/configure.in
index c11268f343..cced6fa901 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1946,6 +1946,7 @@ fi
;;
*)
AC_MSG_RESULT(no)
+ AC_DEFINE(HAVE_NO_ACLS)
;;
esac ],
AC_MSG_RESULT(no)
diff --git a/source3/include/config.h.in b/source3/include/config.h.in
index 98b4ef8b2b..dd8e8dca88 100644
--- a/source3/include/config.h.in
+++ b/source3/include/config.h.in
@@ -201,6 +201,7 @@
#undef MIPS_SPINLOCKS
#undef POWERPC_SPINLOCKS
#undef HAVE_POSIX_ACLS
+#undef HAVE_NO_ACLS
/* The number of bytes in a int. */
#undef SIZEOF_INT
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 561496a8db..5e2bea9c37 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -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_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_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_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);
@@ -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_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_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) ;
/*The following definitions come from lib/system.c */
diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c
index 84989de417..f665c780cf 100644
--- a/source3/lib/sysacls.c
+++ b/source3/lib/sysacls.c
@@ -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_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_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 !
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 )
{
- return acl_valid(thacl);
+ return acl_valid(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);
}
-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)
@@ -266,7 +266,7 @@ int sys_acl_set_file( char *name, SMB_ACL_TYPE_T acltype, SMB_ACL_T theacl)
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;
}
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c
index 10fbdf7bca..8890d54da0 100644
--- a/source3/smbd/posix_acls.c
+++ b/source3/smbd/posix_acls.c
@@ -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.
*/
- 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) {
DEBUG(0,("set_canon_ace_list: sys_acl_set_file failed for file %s (%s).\n",
fsp->fsp_name, strerror(errno) ));
goto done;
}
} 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",
fsp->fsp_name, strerror(errno) ));
goto done;