summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsource3/config.guess6
-rwxr-xr-xsource3/configure42
-rw-r--r--source3/configure.in16
-rw-r--r--source3/lib/sysacls.c10
4 files changed, 38 insertions, 36 deletions
diff --git a/source3/config.guess b/source3/config.guess
index 695867b068..9161c8a573 100755
--- a/source3/config.guess
+++ b/source3/config.guess
@@ -428,9 +428,9 @@ EOF
echo ${UNAME_MACHINE}-unknown-sysv32
fi
exit 0 ;;
- *:UnixWare:*:*)
- echo ${UNAME_MACHINE}-UnixWare-sysv${UNAME_RELEASE}
- exit 0 ;;
+ *:UnixWare:*:* | *:OpenUNIX:*:*)
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
+ exit 0 ;;
Intel:Mach:3*:*)
echo i386-unknown-mach3
exit 0 ;;
diff --git a/source3/configure b/source3/configure
index bcff6d76ed..570d741314 100755
--- a/source3/configure
+++ b/source3/configure
@@ -935,7 +935,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
@@ -8151,45 +8151,45 @@ if test $ac_cv_prog_cc_fpic = yes; then
PICFLAG="-fpic";
fi
if test x$PICFLAG = x; then
- echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
-echo "configure:8156: checking whether ${CC-cc} accepts -Kpic" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
+ echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
+echo "configure:8156: checking whether ${CC-cc} accepts -KPIC" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_Kpic=yes
+if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_KPIC=yes
else
- ac_cv_prog_cc_Kpic=no
+ ac_cv_prog_cc_KPIC=no
fi
rm -f conftest*
fi
-echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
- if test $ac_cv_prog_cc_Kpic = yes; then
- PICFLAG="-Kpic";
+echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
+ if test $ac_cv_prog_cc_KPIC = yes; then
+ PICFLAG="-KPIC";
fi
fi
if test x$PICFLAG = x; then
- echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6
-echo "configure:8177: checking whether ${CC-cc} accepts -KPIC" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_KPIC'+set}'`\" = set"; then
+ echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6
+echo "configure:8177: checking whether ${CC-cc} accepts -Kpic" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_Kpic'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -KPIC -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_KPIC=yes
+if test -z "`${CC-cc} -Kpic -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_Kpic=yes
else
- ac_cv_prog_cc_KPIC=no
+ ac_cv_prog_cc_Kpic=no
fi
rm -f conftest*
fi
-echo "$ac_t""$ac_cv_prog_cc_KPIC" 1>&6
- if test $ac_cv_prog_cc_KPIC = yes; then
- PICFLAG="-KPIC";
+echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6
+ if test $ac_cv_prog_cc_Kpic = yes; then
+ PICFLAG="-Kpic";
fi
fi
@@ -11603,8 +11603,8 @@ if test "${with_acl_support+set}" = set; then
yes)
case "$host_os" in
- *unixware*)
- echo "$ac_t""Using SVR4 ACLs" 1>&6
+ *sysv5*)
+ echo "$ac_t""Using UnixWare ACLs" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_UNIXWARE_ACLS 1
EOF
diff --git a/source3/configure.in b/source3/configure.in
index 6b84c69ef6..3d32346821 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -593,17 +593,17 @@ if test $ac_cv_prog_cc_fpic = yes; then
PICFLAG="-fpic";
fi
if test x$PICFLAG = x; then
- AC_PROG_CC_FLAG(Kpic)
- if test $ac_cv_prog_cc_Kpic = yes; then
- PICFLAG="-Kpic";
- fi
-fi
-if test x$PICFLAG = x; then
AC_PROG_CC_FLAG(KPIC)
if test $ac_cv_prog_cc_KPIC = yes; then
PICFLAG="-KPIC";
fi
fi
+if test x$PICFLAG = x; then
+ AC_PROG_CC_FLAG(Kpic)
+ if test $ac_cv_prog_cc_Kpic = yes; then
+ PICFLAG="-Kpic";
+ fi
+fi
################
@@ -1984,8 +1984,8 @@ AC_ARG_WITH(acl-support,
yes)
case "$host_os" in
- *unixware*)
- AC_MSG_RESULT(Using SVR4 ACLs)
+ *sysv5*)
+ AC_MSG_RESULT(Using UnixWare ACLs)
AC_DEFINE(HAVE_UNIXWARE_ACLS)
;;
*solaris*)
diff --git a/source3/lib/sysacls.c b/source3/lib/sysacls.c
index b0ba2075ab..778f467c12 100644
--- a/source3/lib/sysacls.c
+++ b/source3/lib/sysacls.c
@@ -302,18 +302,19 @@ SMB_ACL_T sys_acl_get_file(const char *path_p, SMB_ACL_TYPE_T type)
while ((count = acl(path_p, GETACL, count, &acl_d->acl[0])) < 0
&& errno == ENOSPC) {
+ sys_acl_free_acl(acl_d);
+
if ((count = acl(path_p, GETACLCNT, 0, NULL)) < 0) {
return NULL;
}
- sys_acl_free_acl(acl_d);
-
if ((acl_d = sys_acl_init(count)) == NULL) {
return NULL;
}
}
if (count < 0) {
+ sys_acl_free_acl(acl_d);
return NULL;
}
@@ -365,18 +366,19 @@ SMB_ACL_T sys_acl_get_fd(int fd)
while ((count = facl(fd, GETACL, count, &acl_d->acl[0])) < 0
&& errno == ENOSPC) {
+ sys_acl_free_acl(acl_d);
+
if ((count = facl(fd, GETACLCNT, 0, NULL)) < 0) {
return NULL;
}
- sys_acl_free_acl(acl_d);
-
if ((acl_d = sys_acl_init(count)) == NULL) {
return NULL;
}
}
if (count < 0) {
+ sys_acl_free_acl(acl_d);
return NULL;
}