diff options
author | Luke Leighton <lkcl@samba.org> | 2000-03-21 21:21:07 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-03-21 21:21:07 +0000 |
commit | 41d45a435b3277a34a92e02db698a298a5af8b9a (patch) | |
tree | 18e675f94ae97e68a807dca545a5a94c0ca841f6 /source | |
parent | 989ad2446746e08749ce1d48c5154e373510fb16 (diff) | |
download | samba-41d45a435b3277a34a92e02db698a298a5af8b9a.tar.gz samba-41d45a435b3277a34a92e02db698a298a5af8b9a.tar.xz samba-41d45a435b3277a34a92e02db698a298a5af8b9a.zip |
- arranged setresuid/setresgid etc detection. this is horrible, because
setresgid/setegid/setregid etc do not work without setresuid etc being
called first. therefore, i had to add a 16-way matrix to set USE_SETRESUID
_and_ USE_SETRESGID etc etc in order to detect the correct USE_SET??GID
etc.
why? because linux/alpha has setresuid but not setresgid! how many other
systems have this silly kind of mis-match?
- cut across andrew's setuid etc mods, removing direct calls to seteuid etc.
also:
From Elrond@Wunder-Nett.org Wed Mar 22 06:33:51 2000
Date: Tue, 21 Mar 2000 16:53:32 +0100
From: Elrond <Elrond@Wunder-Nett.org>
To: Luke Kenneth Casson Leighton <lkcl@samba.org>
Subject: more merge, sharegetinfo and things
- as Greg noticed, libubiqx isn't currently needed by
rpcclient, so removed it from the linkline.
- merged some more fun from HEAD for configure.in /
acconfig.h
- someone broke it and set the lockdir to $prefix/var
instead of $prefix/var/locks in configure.in... And I was
wondering, why my stop-start-script couldn't stop samba
any more
- lib/debug.c-merge, this also should fix some prob on
irix, I was having. (please don't indent this one)
- sids: Creator-Owner is S-1-3-0 not S-1-3, SYSTEM is
S-1-5-18, not -17.
- lsarpcd: I changed the behaviour back a bit to return
dom\dom for domains and well-known-sids. It's not the
"correct" behaviour, but it makes "add user" in the
"acl-editor" nicer.
- params/loadparm.c: Merged some things from HEAD and
reordered a bit to reflect HEAD more. Of course the new
parameters are completely unused.
- Got share_get_info at level 502 answer working, and one
can now even see the "max connections" from nt.
Elrond
Diffstat (limited to 'source')
-rw-r--r-- | source/Makefile.in | 16 | ||||
-rw-r--r-- | source/acconfig.h | 31 | ||||
-rw-r--r-- | source/auth/pass_check.c | 60 | ||||
-rwxr-xr-x | source/configure | 2174 | ||||
-rw-r--r-- | source/configure.in | 381 | ||||
-rw-r--r-- | source/include/config.h.in | 43 | ||||
-rw-r--r-- | source/include/proto.h | 32 | ||||
-rw-r--r-- | source/include/rpc_parse_proto.h | 3 | ||||
-rw-r--r-- | source/include/winbindd_proto.h | 3 | ||||
-rw-r--r-- | source/lib/debug.c | 58 | ||||
-rw-r--r-- | source/lib/set_uid.c | 334 | ||||
-rw-r--r-- | source/lib/sids.c | 12 | ||||
-rw-r--r-- | source/lib/util_sec.c | 160 | ||||
-rw-r--r-- | source/lsarpcd/srv_lsa_samdb.c | 6 | ||||
-rw-r--r-- | source/msrpc/msrpcd.c | 10 | ||||
-rw-r--r-- | source/param/loadparm.c | 41 | ||||
-rw-r--r-- | source/passdb/pass_check.c | 60 | ||||
-rw-r--r-- | source/rpc_parse/parse_srv.c | 3 | ||||
-rw-r--r-- | source/rpc_server/srv_srvsvc.c | 6 | ||||
-rw-r--r-- | source/smbd/chgpasswd.c | 25 | ||||
-rw-r--r-- | source/smbd/quotas.c | 258 | ||||
-rw-r--r-- | source/smbd/server.c | 10 | ||||
-rw-r--r-- | source/srvsvcd/srv_srvsvc_nt.c | 268 | ||||
-rw-r--r-- | source/utils/smbrun.c | 28 |
24 files changed, 2819 insertions, 1203 deletions
diff --git a/source/Makefile.in b/source/Makefile.in index dad98a5445c..ea94baea344 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -454,7 +454,7 @@ SWAT_OBJ = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \ SWAT_LIBS = $(SAMBA_LIBS) $(SMBPWLIB) $(UBIQXLIB) $(LIBSURS) -SMBRUN_OBJ = utils/smbrun.o +SMBRUN_OBJ = utils/smbrun.o lib/util_sec.o SMBSH_OBJ = smbwrapper/smbsh.o smbwrapper/shared.o @@ -483,7 +483,7 @@ REGEDIT_OBJ = lib/cmd_interp.o \ rpcclient/display_sec.o \ rpcclient/cmd_reg.o \ $(STUB_UID_OBJ) -REGEDIT_LIBS = $(SAMBA_LIBS) $(UBIQXLIB) +REGEDIT_LIBS = $(SAMBA_LIBS) SVCCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/svcctrl.o \ @@ -492,7 +492,7 @@ SVCCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/cmd_svcctl.o \ $(SIDDB_OBJ) \ $(STUB_UID_OBJ) -SVCCLIENT_LIBS = $(SAMBA_LIBS) $(UBIQXLIB) +SVCCLIENT_LIBS = $(SAMBA_LIBS) SAMCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/samedit.o \ @@ -505,7 +505,7 @@ SAMCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/cmd_netlogon.o \ $(SIDDB_OBJ) \ $(STUB_UID_OBJ) -SAMCLIENT_LIBS = $(SAMBA_LIBS) $(UBIQXLIB) +SAMCLIENT_LIBS = $(SAMBA_LIBS) CMDCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/cmdat.o \ @@ -514,7 +514,7 @@ CMDCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/cmd_atsvc.o \ $(SIDDB_OBJ) \ $(STUB_UID_OBJ) -CMDCLIENT_LIBS = $(SAMBA_LIBS) $(UBIQXLIB) +CMDCLIENT_LIBS = $(SAMBA_LIBS) NETCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/net.o \ @@ -528,7 +528,7 @@ NETCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/cmd_srvsvc.o \ $(SIDDB_OBJ) \ $(STUB_UID_OBJ) -NETCLIENT_LIBS = $(SAMBA_LIBS) $(UBIQXLIB) +NETCLIENT_LIBS = $(SAMBA_LIBS) EVTCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/eventlog.o \ @@ -568,7 +568,7 @@ SPOOLCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/cmd_spoolss.o \ $(SIDDB_OBJ) \ $(STUB_UID_OBJ) -SPOOLCLIENT_LIBS = $(SAMBA_LIBS) $(UBIQXLIB) +SPOOLCLIENT_LIBS = $(SAMBA_LIBS) RPCCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/rpcclient.o \ @@ -606,7 +606,7 @@ RPCCLIENT_OBJ = lib/cmd_interp.o \ rpcclient/cmd_dfs.o \ $(SIDDB_OBJ) \ $(STUB_UID_OBJ) -RPCCLIENT_LIBS = $(SAMBA_LIBS) $(UBIQXLIB) +RPCCLIENT_LIBS = $(SAMBA_LIBS) SMBWRAPPER_OBJ = smbwrapper/smbw.o smbwrapper/wrapped.o \ smbwrapper/smbw_dir.o smbwrapper/smbw_stat.o \ diff --git a/source/acconfig.h b/source/acconfig.h index 1ba9dc62486..4bdbba297dc 100644 --- a/source/acconfig.h +++ b/source/acconfig.h @@ -1,3 +1,4 @@ +#undef HAVE_VOLATILE #undef HAVE_BROKEN_READDIR #undef HAVE_ERRNO_DECL #undef HAVE_LONGLONG @@ -5,6 +6,7 @@ #undef HAVE_REMSH #undef HAVE_UNSIGNED_CHAR #undef HAVE_UTIMBUF +#undef HAVE_SIG_ATOMIC_T_TYPE #undef ssize_t #undef ino_t #undef ssize_t @@ -23,19 +25,22 @@ #undef AIX #undef BSD #undef IRIX +#undef IRIX6 #undef HPUX #undef QNX #undef SCO #undef OSF1 #undef NEXT2 +#undef RELIANTUNIX #undef HAVE_SHARED_MMAP +#undef HAVE_MMAP #undef HAVE_SYSV_IPC #undef HAVE_FCNTL_LOCK #undef HAVE_FTRUNCATE_EXTEND +#undef FTRUNCATE_NEEDS_ROOT #undef HAVE_TRAPDOOR_UID #undef HAVE_ROOT #undef HAVE_UNION_SEMUN -#undef HAVE_NETMASK_IFCONF #undef HAVE_GETTIMEOFDAY_TZ #undef HAVE_SOCK_SIN_LEN #undef STAT_READ_FILSYS @@ -46,8 +51,13 @@ #undef STAT_STATFS4 #undef STAT_STATVFS #undef STAT_STATVFS64 +#undef HAVE_PAM_AUTHENTICATE +#undef HAVE_NETMASK_IFCONF #undef HAVE_NETMASK_IFREQ #undef HAVE_NETMASK_AIX +#undef HAVE_IFACE_AIX +#undef HAVE_IFACE_IFCONF +#undef HAVE_IFACE_IFREQ #undef HAVE_CRYPT #undef HAVE_PUTPRPWNAM #undef HAVE_SET_AUTH_PARAMETERS @@ -58,19 +68,23 @@ #undef WITH_LDAP #undef WITH_TDBSURS #undef WITH_NISPLUS +#undef WITH_PAM #undef WITH_NISPLUS_HOME #undef WITH_AUTOMOUNT #undef WITH_SMBMOUNT -#undef HAVE_PAM_AUTHENTICATE #undef HAVE_BROKEN_GETGROUPS #undef REPLACE_GETPASS #undef REPLACE_INET_NTOA #undef HAVE_FILE_MACRO #undef HAVE_FUNCTION_MACRO #undef HAVE_SETRESUID_DECL -#undef HAVE_CRYPT_DECL #undef HAVE_SETRESUID +#undef HAVE_SETRESGID_DECL +#undef HAVE_SETRESGID +#undef HAVE_CRYPT_DECL #undef WITH_NETATALK +#undef WITH_UTMP +#undef MS_DFS #undef HAVE_INO64_T #undef HAVE_STRUCT_FLOCK64 #undef SIZEOF_INO_T @@ -85,11 +99,15 @@ #undef HAVE_INT32_FROM_RPC_RPC_H #undef HAVE_UINT32_FROM_RPC_RPC_H #undef KRB4_AUTH +#undef KRB5_AUTH #undef SEEKDIR_RETURNS_VOID #undef HAVE_DIRENT_D_OFF #undef HAVE_GETSPNAM #undef HAVE_BIGCRYPT #undef HAVE_GETPRPWNAM +#undef HAVE_SHADOW_H +#undef HAVE_MEMSET +#undef USE_BOTH_CRYPT_CALLS #undef WITH_LIBMSRPC #undef WITH_LIBNMB @@ -99,13 +117,16 @@ #undef WITH_LIBSMBPW #undef WITH_LIBUBIQX +#undef USE_SETEGID +#undef USE_SETRESGID +#undef USE_SETREGID +#undef USE_SETGIDX #undef USE_SETEUID #undef USE_SETRESUID #undef USE_SETREUID #undef USE_SETUIDX +#undef SYSCONF_SC_NGROUPS_MAX #undef USE_KRB4_DEFINE_WORK_AROUND #undef USE_RENEWABLE_AFS_TICKET #undef WITH_NT5LDAP - -#undef HAVE_VOLATILE diff --git a/source/auth/pass_check.c b/source/auth/pass_check.c index 93b9a382d87..c45e3a7799c 100644 --- a/source/auth/pass_check.c +++ b/source/auth/pass_check.c @@ -200,6 +200,7 @@ static BOOL dfs_auth(char *user, char *password) sec_passwd_rec_t passwd_rec; sec_login_auth_src_t auth_src = sec_login_auth_src_network; unsigned char dce_errstr[dce_c_error_string_len]; + gid_t egid; if (dcelogin_atmost_once) return (False); @@ -348,16 +349,18 @@ static BOOL dfs_auth(char *user, char *password) * back to being root on error though. JRA. */ - if (setregid(-1, pw->pw_gid) != 0) + egid = getegid(); + + if (set_effective_gid(pw->pw_gid) != 0) { DEBUG(0, ("Can't set egid to %d (%s)\n", pw->pw_gid, strerror(errno))); return False; } - if (setreuid(-1, pw->pw_uid) != 0) + if (set_effective_uid(pw->pw_uid) != 0) { - setgid(0); + set_effective_gid(egid); DEBUG(0, ("Can't set euid to %d (%s)\n", pw->pw_uid, strerror(errno))); return False; @@ -368,12 +371,9 @@ static BOOL dfs_auth(char *user, char *password) &my_dce_sec_context, &err) == 0) { dce_error_inq_text(err, dce_errstr, &err2); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); DEBUG(0, ("DCE Setup Identity for %s failed: %s\n", user, dce_errstr)); - return (False); + goto err; } sec_login_get_pwent(my_dce_sec_context, @@ -381,12 +381,8 @@ static BOOL dfs_auth(char *user, char *password) if (err != error_status_ok) { dce_error_inq_text(err, dce_errstr, &err2); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); DEBUG(0, ("DCE can't get pwent. %s\n", dce_errstr)); - - return (False); + goto err; } passwd_rec.version_number = sec_passwd_c_version_none; @@ -400,26 +396,18 @@ static BOOL dfs_auth(char *user, char *password) if (err != error_status_ok) { dce_error_inq_text(err, dce_errstr, &err2); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); DEBUG(0, ("DCE Identity Validation failed for principal %s: %s\n", user, dce_errstr)); - - return (False); + goto err; } sec_login_certify_identity(my_dce_sec_context, &err); if (err != error_status_ok) { dce_error_inq_text(err, dce_errstr, &err2); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); DEBUG(0, ("DCE certify identity failed: %s\n", dce_errstr)); - - return (False); + goto err; } if (auth_src != sec_login_auth_src_network) @@ -436,10 +424,7 @@ static BOOL dfs_auth(char *user, char *password) user, dce_errstr)); sec_login_purge_context(&my_dce_sec_context, &err); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); - return (False); + goto err; } sec_login_get_pwent(my_dce_sec_context, @@ -448,11 +433,7 @@ static BOOL dfs_auth(char *user, char *password) { dce_error_inq_text(err, dce_errstr, &err2); DEBUG(0, ("DCE can't get pwent. %s\n", dce_errstr)); - - /* Go back to root, JRA. */ - setuid(0); - setgid(0); - return (False); + goto err; } DEBUG(0, ("DCE login succeeded for principal %s on pid %d\n", @@ -471,22 +452,25 @@ static BOOL dfs_auth(char *user, char *password) if (err != error_status_ok) { dce_error_inq_text(err, dce_errstr, &err2); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); DEBUG(0, ("DCE can't get expiration. %s\n", dce_errstr)); - - return (False); + goto err; } - setuid(0); - setgid(0); + set_effective_uid(0); + set_effective_gid(0); DEBUG(0, ("DCE context expires: %s", asctime(localtime(&expire_time)))); dcelogin_atmost_once = 1; return (True); + + err: + + /* Go back to root, JRA. */ + set_effective_uid(0); + set_effective_gid(egid); + return (False); } void dfs_unlogin(void) diff --git a/source/configure b/source/configure index 99656634144..7c4eca7a138 100755 --- a/source/configure +++ b/source/configure @@ -87,7 +87,15 @@ ac_help="$ac_help --with-quotas Include experimental disk-quota support --without-quotas Don't include experimental disk-quota support (default)" ac_help="$ac_help + --with-utmp Include experimental utmp accounting + --without-utmp Don't include experimental utmp accounting (default)" +ac_help="$ac_help + --with-msdfs Include MS Dfs support + --without-msdfs Don't include MS Dfs support (default)" +ac_help="$ac_help --with-privatedir=DIR Where to put smbpasswd ($ac_default_prefix/private)" +ac_help="$ac_help + --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -618,7 +626,7 @@ CFLAGS=${CFLAGS-"-O"} # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:622: checking for $ac_word" >&5 +echo "configure:630: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -648,7 +656,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:652: checking for $ac_word" >&5 +echo "configure:660: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -699,7 +707,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:703: checking for $ac_word" >&5 +echo "configure:711: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -731,7 +739,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:735: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 +echo "configure:743: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -742,12 +750,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 746 "configure" +#line 754 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -773,12 +781,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:777: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:785: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:782: checking whether we are using GNU C" >&5 +echo "configure:790: checking whether we are using GNU C" >&5 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -787,7 +795,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -806,7 +814,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:810: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:818: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -838,7 +846,7 @@ else fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:842: checking how to run the C preprocessor" >&5 +echo "configure:850: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -853,13 +861,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext <<EOF -#line 857 "configure" +#line 865 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -870,13 +878,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext <<EOF -#line 874 "configure" +#line 882 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:888: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -887,13 +895,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext <<EOF -#line 891 "configure" +#line 899 "configure" #include "confdefs.h" #include <assert.h> Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -948,7 +956,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:952: checking for a BSD compatible install" >&5 +echo "configure:960: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"\${ac_cv_path_install+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1009,7 +1017,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1013: checking for $ac_word" >&5 +echo "configure:1021: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1110,7 +1118,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:1114: checking host system type" >&5 +echo "configure:1122: checking host system type" >&5 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then # Make sure we can run config.sub. @@ -1151,7 +1159,7 @@ host_os=$ac_cv_host_os echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1155: checking build system type" >&5 +echo "configure:1163: checking build system type" >&5 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then # Make sure we can run config.sub. @@ -1192,7 +1200,7 @@ build_os=$ac_cv_build_os # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1196: checking for $ac_word" >&5 +echo "configure:1204: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1231,7 +1239,7 @@ ac_prog=ld if test "$ac_cv_prog_gcc" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6 -echo "configure:1235: checking for ld used by GCC" >&5 +echo "configure:1243: checking for ld used by GCC" >&5 ac_prog=`($CC -print-prog-name=ld) 2>&5` case "$ac_prog" in # Accept absolute paths. @@ -1255,10 +1263,10 @@ echo "configure:1235: checking for ld used by GCC" >&5 esac elif test "$with_gnu_ld" = yes; then echo $ac_n "checking for GNU ld""... $ac_c" 1>&6 -echo "configure:1259: checking for GNU ld" >&5 +echo "configure:1267: checking for GNU ld" >&5 else echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6 -echo "configure:1262: checking for non-GNU ld" >&5 +echo "configure:1270: checking for non-GNU ld" >&5 fi if eval "test \"\${ac_cv_path_LD+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1293,7 +1301,7 @@ else fi test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; } echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6 -echo "configure:1297: checking if the linker ($LD) is GNU ld" >&5 +echo "configure:1305: checking if the linker ($LD) is GNU ld" >&5 if eval "test \"\${ac_cv_prog_gnu_ld+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1309,7 +1317,7 @@ echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6 -echo "configure:1313: checking for BSD-compatible nm" >&5 +echo "configure:1321: checking for BSD-compatible nm" >&5 if eval "test \"\${ac_cv_path_NM+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1345,7 +1353,7 @@ NM="$ac_cv_path_NM" echo "$ac_t""$NM" 1>&6 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1349: checking whether ln -s works" >&5 +echo "configure:1357: checking whether ln -s works" >&5 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1394,8 +1402,8 @@ test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" case "$lt_target" in *-*-irix6*) # Find out which ABI we are using. - echo '#line 1398 "configure"' > conftest.$ac_ext - if { (eval echo configure:1399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + echo '#line 1406 "configure"' > conftest.$ac_ext + if { (eval echo configure:1407: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then case "`/usr/bin/file conftest.o`" in *32-bit*) LD="${LD-ld} -32" @@ -1416,19 +1424,19 @@ case "$lt_target" in SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6 -echo "configure:1420: checking whether the C compiler needs -belf" >&5 +echo "configure:1428: checking whether the C compiler needs -belf" >&5 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1425 "configure" +#line 1433 "configure" #include "confdefs.h" int main() { ; return 0; } EOF -if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* lt_cv_cc_needs_belf=yes else @@ -1533,10 +1541,10 @@ exec 5>>./config.log if test "x$CC" != xcc; then echo $ac_n "checking whether $CC and cc understand -c and -o together""... $ac_c" 1>&6 -echo "configure:1537: checking whether $CC and cc understand -c and -o together" >&5 +echo "configure:1545: checking whether $CC and cc understand -c and -o together" >&5 else echo $ac_n "checking whether cc understands -c and -o together""... $ac_c" 1>&6 -echo "configure:1540: checking whether cc understands -c and -o together" >&5 +echo "configure:1548: checking whether cc understands -c and -o together" >&5 fi set dummy $CC; ac_cc="`echo $2 | sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" @@ -1548,16 +1556,16 @@ else # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='${CC-cc} -c conftest.c -o conftest.o 1>&5' -if { (eval echo configure:1552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; +if { (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. - if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then + if { ac_try='cc -c conftest.c 1>&5'; { (eval echo configure:1566: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then ac_try='cc -c conftest.c -o conftest.o 1>&5' - if { (eval echo configure:1560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && - test -f conftest.o && { (eval echo configure:1561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; + if { (eval echo configure:1568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } && + test -f conftest.o && { (eval echo configure:1569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; then # cc works too. : @@ -1591,20 +1599,20 @@ fi echo $ac_n "checking that the C compiler understands volatile""... $ac_c" 1>&6 -echo "configure:1595: checking that the C compiler understands volatile" >&5 +echo "configure:1603: checking that the C compiler understands volatile" >&5 if eval "test \"\${samba_cv_volatile+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1601 "configure" +#line 1609 "configure" #include "confdefs.h" #include <sys/types.h> int main() { volatile int i = 0 ; return 0; } EOF -if { (eval echo configure:1608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_volatile=yes else @@ -1628,7 +1636,7 @@ fi echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:1632: checking target system type" >&5 +echo "configure:1640: checking target system type" >&5 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then # Make sure we can run config.sub. @@ -1695,7 +1703,7 @@ test "$host_alias" != "$target_alias" && echo $ac_n "checking config.cache system type""... $ac_c" 1>&6 -echo "configure:1699: checking config.cache system type" >&5 +echo "configure:1707: checking config.cache system type" >&5 if { test x"${ac_cv_host_system_type+set}" = x"set" && test x"$ac_cv_host_system_type" != x"$host"; } || { test x"${ac_cv_build_system_type+set}" = x"set" && @@ -1725,7 +1733,7 @@ fi # Extract the first word of "autoconf", so it can be a program name with args. set dummy autoconf; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1729: checking for $ac_word" >&5 +echo "configure:1737: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_AUTOCONF+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1762,7 +1770,7 @@ fi # Extract the first word of "autoheader", so it can be a program name with args. set dummy autoheader; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1766: checking for $ac_word" >&5 +echo "configure:1774: checking for $ac_word" >&5 if eval "test \"\${ac_cv_path_AUTOHEADER+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1806,7 +1814,7 @@ case "$host_os" in # Try to work out if this is the native HPUX compiler that uses the -Ae flag. *hpux*) echo $ac_n "checking whether ${CC-cc} accepts -Ae""... $ac_c" 1>&6 -echo "configure:1810: checking whether ${CC-cc} accepts -Ae" >&5 +echo "configure:1818: checking whether ${CC-cc} accepts -Ae" >&5 if eval "test \"\${ac_cv_prog_cc_Ae+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1830,6 +1838,7 @@ echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6 # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set. # *aix4*) + echo "$ac_t""enabling large file support" 1>&6 CPPFLAGS="$CPPFLAGS -D_LARGE_FILES" ;; # @@ -1838,17 +1847,17 @@ echo "$ac_t""$ac_cv_prog_cc_Ae" 1>&6 *irix*) ac_safe=`echo "standards.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for standards.h""... $ac_c" 1>&6 -echo "configure:1842: checking for standards.h" >&5 +echo "configure:1851: checking for standards.h" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1847 "configure" +#line 1856 "configure" #include "confdefs.h" #include <standards.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1861: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1873,24 +1882,64 @@ else fi ;; + *hurd*) + echo $ac_n "checking for LFS support""... $ac_c" 1>&6 +echo "configure:1888: checking for LFS support" >&5 + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" + if test "$cross_compiling" = yes; then + GLIBC_LFS_SUPPORT=cross +else + cat > conftest.$ac_ext <<EOF +#line 1895 "configure" +#include "confdefs.h" + +#include <unistd.h> +main () { +#if _LFS64_LARGEFILE == 1 +exit(0); +#else +exit(1); +#endif +} +EOF +if { (eval echo configure:1907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + GLIBC_LFS_SUPPORT=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + GLIBC_LFS_SUPPORT=no +fi +rm -fr conftest* +fi + + CPPFLAGS="$old_CPPFLAGS" + if test x$GLIBC_LFS_SUPPORT = xyes ; then + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" + fi + echo "$ac_t""$GLIBC_LFS_SUPPORT" 1>&6 + ;; + esac echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1880: checking for inline" >&5 +echo "configure:1929: checking for inline" >&5 if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 1887 "configure" +#line 1936 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:1894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1916,12 +1965,12 @@ EOF esac echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1920: checking for ANSI C header files" >&5 +echo "configure:1969: checking for ANSI C header files" >&5 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1925 "configure" +#line 1974 "configure" #include "confdefs.h" #include <stdlib.h> #include <stdarg.h> @@ -1929,7 +1978,7 @@ else #include <float.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1946,7 +1995,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1950 "configure" +#line 1999 "configure" #include "confdefs.h" #include <string.h> EOF @@ -1964,7 +2013,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext <<EOF -#line 1968 "configure" +#line 2017 "configure" #include "confdefs.h" #include <stdlib.h> EOF @@ -1985,7 +2034,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 1989 "configure" +#line 2038 "configure" #include "confdefs.h" #include <ctype.h> #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1996,7 +2045,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2024,12 +2073,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:2028: checking for $ac_hdr that defines DIR" >&5 +echo "configure:2077: checking for $ac_hdr that defines DIR" >&5 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2033 "configure" +#line 2082 "configure" #include "confdefs.h" #include <sys/types.h> #include <$ac_hdr> @@ -2037,7 +2086,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2062,7 +2111,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2066: checking for opendir in -ldir" >&5 +echo "configure:2115: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2070,7 +2119,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <<EOF -#line 2074 "configure" +#line 2123 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2081,7 +2130,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:2085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2103,7 +2152,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2107: checking for opendir in -lx" >&5 +echo "configure:2156: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2111,7 +2160,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <<EOF -#line 2115 "configure" +#line 2164 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -2122,7 +2171,7 @@ int main() { opendir() ; return 0; } EOF -if { (eval echo configure:2126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2145,12 +2194,12 @@ fi fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2149: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2198: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"\${ac_cv_header_time+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2154 "configure" +#line 2203 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/time.h> @@ -2159,7 +2208,7 @@ int main() { struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2212: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2180,12 +2229,12 @@ EOF fi echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6 -echo "configure:2184: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo "configure:2233: checking for sys/wait.h that is POSIX.1 compatible" >&5 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2189 "configure" +#line 2238 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/wait.h> @@ -2201,7 +2250,7 @@ wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } EOF -if { (eval echo configure:2205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_sys_wait_h=yes else @@ -2225,17 +2274,17 @@ for ac_hdr in arpa/inet.h sys/fcntl.h sys/select.h fcntl.h sys/time.h sys/unistd do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2229: checking for $ac_hdr" >&5 +echo "configure:2278: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2234 "configure" +#line 2283 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2265,17 +2314,17 @@ for ac_hdr in sys/param.h ctype.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2269: checking for $ac_hdr" >&5 +echo "configure:2318: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2274 "configure" +#line 2323 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2305,17 +2354,17 @@ for ac_hdr in unistd.h utime.h grp.h sys/id.h limits.h memory.h net/route.h net/ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2309: checking for $ac_hdr" >&5 +echo "configure:2358: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2314 "configure" +#line 2363 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2345,17 +2394,17 @@ for ac_hdr in compat.h rpc/rpc.h rpcsvc/yp_prot.h rpcsvc/ypclnt.h sys/param.h ct do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2349: checking for $ac_hdr" >&5 +echo "configure:2398: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2354 "configure" +#line 2403 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2385,17 +2434,17 @@ for ac_hdr in sys/wait.h sys/resource.h sys/ioctl.h sys/mode.h sys/mman.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2389: checking for $ac_hdr" >&5 +echo "configure:2438: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2394 "configure" +#line 2443 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2399: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2425,17 +2474,17 @@ for ac_hdr in sys/filio.h string.h strings.h stdlib.h sys/socket.h sys/un.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2429: checking for $ac_hdr" >&5 +echo "configure:2478: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2434 "configure" +#line 2483 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2465,17 +2514,17 @@ for ac_hdr in sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2469: checking for $ac_hdr" >&5 +echo "configure:2518: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2474 "configure" +#line 2523 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2528: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2505,17 +2554,17 @@ for ac_hdr in sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2509: checking for $ac_hdr" >&5 +echo "configure:2558: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2514 "configure" +#line 2563 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2542,22 +2591,52 @@ fi done # +# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT. +# This causes configure to fail to detect it. Check for shadow separately on HPUX. # +case "$host_os" in + *hpux*) + cat > conftest.$ac_ext <<EOF +#line 2601 "configure" +#include "confdefs.h" +#include <shadow.h> +int main() { +struct spwd testme +; return 0; } +EOF +if { (eval echo configure:2608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_header_shadow_h=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_header_shadow_h=no +fi +rm -f conftest* + if test x"$ac_cv_header_shadow_h" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SHADOW_H 1 +EOF + + fi + ;; +esac for ac_hdr in shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2551: checking for $ac_hdr" >&5 +echo "configure:2630: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2556 "configure" +#line 2635 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2587,17 +2666,17 @@ for ac_hdr in sys/security.h security/pam_appl.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2591: checking for $ac_hdr" >&5 +echo "configure:2670: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2596 "configure" +#line 2675 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2627,17 +2706,17 @@ for ac_hdr in stropts.h poll.h readline.h history.h readline/readline.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2631: checking for $ac_hdr" >&5 +echo "configure:2710: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2636 "configure" +#line 2715 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2667,17 +2746,17 @@ for ac_hdr in readline/history.h sys/capability.h syscall.h sys/syscall.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2671: checking for $ac_hdr" >&5 +echo "configure:2750: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2676 "configure" +#line 2755 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2707,17 +2786,17 @@ for ac_hdr in sys/acl.h sys/cdefs.h glob.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2711: checking for $ac_hdr" >&5 +echo "configure:2790: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2716 "configure" +#line 2795 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2747,17 +2826,17 @@ for ac_hdr in mysql.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2751: checking for $ac_hdr" >&5 +echo "configure:2830: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2756 "configure" +#line 2835 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2789,17 +2868,17 @@ for ac_hdr in utmp.h utmpx.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2793: checking for $ac_hdr" >&5 +echo "configure:2872: checking for $ac_hdr" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2798 "configure" +#line 2877 "configure" #include "confdefs.h" #include <$ac_hdr> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2827,7 +2906,7 @@ done echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2831: checking size of int" >&5 +echo "configure:2910: checking size of int" >&5 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2835,7 +2914,7 @@ else ac_cv_sizeof_int=cross else cat > conftest.$ac_ext <<EOF -#line 2839 "configure" +#line 2918 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -2846,7 +2925,7 @@ main() exit(0); } EOF -if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2866,7 +2945,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2870: checking size of long" >&5 +echo "configure:2949: checking size of long" >&5 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2874,7 +2953,7 @@ else ac_cv_sizeof_long=cross else cat > conftest.$ac_ext <<EOF -#line 2878 "configure" +#line 2957 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -2885,7 +2964,7 @@ main() exit(0); } EOF -if { (eval echo configure:2889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2905,7 +2984,7 @@ EOF echo $ac_n "checking size of short""... $ac_c" 1>&6 -echo "configure:2909: checking size of short" >&5 +echo "configure:2988: checking size of short" >&5 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2913,7 +2992,7 @@ else ac_cv_sizeof_short=cross else cat > conftest.$ac_ext <<EOF -#line 2917 "configure" +#line 2996 "configure" #include "confdefs.h" #include <stdio.h> main() @@ -2924,7 +3003,7 @@ main() exit(0); } EOF -if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_short=`cat conftestval` else @@ -2945,12 +3024,12 @@ EOF echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2949: checking for working const" >&5 +echo "configure:3028: checking for working const" >&5 if eval "test \"\${ac_cv_c_const+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 2954 "configure" +#line 3033 "configure" #include "confdefs.h" int main() { @@ -2999,7 +3078,7 @@ ccp = (char const *const *) p; ; return 0; } EOF -if { (eval echo configure:3003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -3020,21 +3099,21 @@ EOF fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:3024: checking for inline" >&5 +echo "configure:3103: checking for inline" >&5 if eval "test \"\${ac_cv_c_inline+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF -#line 3031 "configure" +#line 3110 "configure" #include "confdefs.h" int main() { } $ac_kw foo() { ; return 0; } EOF -if { (eval echo configure:3038: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -3060,14 +3139,14 @@ EOF esac echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:3064: checking whether byte ordering is bigendian" >&5 +echo "configure:3143: checking whether byte ordering is bigendian" >&5 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext <<EOF -#line 3071 "configure" +#line 3150 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -3078,11 +3157,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3161: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext <<EOF -#line 3086 "configure" +#line 3165 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/param.h> @@ -3093,7 +3172,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:3097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3176: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -3113,7 +3192,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 3117 "configure" +#line 3196 "configure" #include "confdefs.h" main () { /* Are we little or big endian? From Harbison&Steele. */ @@ -3126,7 +3205,7 @@ main () { exit (u.c[sizeof (long) - 1] == 1); } EOF -if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -3150,14 +3229,14 @@ EOF fi echo $ac_n "checking whether char is unsigned""... $ac_c" 1>&6 -echo "configure:3154: checking whether char is unsigned" >&5 +echo "configure:3233: checking whether char is unsigned" >&5 if eval "test \"\${ac_cv_c_char_unsigned+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test "$GCC" = yes; then # GCC predefines this symbol on systems where it applies. cat > conftest.$ac_ext <<EOF -#line 3161 "configure" +#line 3240 "configure" #include "confdefs.h" #ifdef __CHAR_UNSIGNED__ yes @@ -3179,7 +3258,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <<EOF -#line 3183 "configure" +#line 3262 "configure" #include "confdefs.h" /* volatile prevents gcc2 from optimizing the test away on sparcs. */ #if !defined(__STDC__) || __STDC__ != 1 @@ -3189,7 +3268,7 @@ main() { volatile char c = 255; exit(c < 0); } EOF -if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_char_unsigned=yes else @@ -3214,12 +3293,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3218: checking return type of signal handlers" >&5 +echo "configure:3297: checking return type of signal handlers" >&5 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3223 "configure" +#line 3302 "configure" #include "confdefs.h" #include <sys/types.h> #include <signal.h> @@ -3236,7 +3315,7 @@ int main() { int i; ; return 0; } EOF -if { (eval echo configure:3240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3255,12 +3334,12 @@ EOF echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6 -echo "configure:3259: checking for uid_t in sys/types.h" >&5 +echo "configure:3338: checking for uid_t in sys/types.h" >&5 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3264 "configure" +#line 3343 "configure" #include "confdefs.h" #include <sys/types.h> EOF @@ -3289,12 +3368,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3293: checking for mode_t" >&5 +echo "configure:3372: checking for mode_t" >&5 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3298 "configure" +#line 3377 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3324,12 +3403,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3328: checking for off_t" >&5 +echo "configure:3407: checking for off_t" >&5 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3333 "configure" +#line 3412 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3359,12 +3438,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3363: checking for size_t" >&5 +echo "configure:3442: checking for size_t" >&5 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3368 "configure" +#line 3447 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3394,12 +3473,12 @@ EOF fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3398: checking for pid_t" >&5 +echo "configure:3477: checking for pid_t" >&5 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3403 "configure" +#line 3482 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3429,12 +3508,12 @@ EOF fi echo $ac_n "checking for member st_rdev in aggregate type struct stat""... $ac_c" 1>&6 -echo "configure:3433: checking for member st_rdev in aggregate type struct stat" >&5 +echo "configure:3512: checking for member st_rdev in aggregate type struct stat" >&5 if eval "test \"\${ac_cv_c_struct_member_st_rdev+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3438 "configure" +#line 3517 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/stat.h> @@ -3442,7 +3521,7 @@ int main() { struct stat foo; foo.st_rdev; ; return 0; } EOF -if { (eval echo configure:3446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_struct_member_st_rdev=yes else @@ -3464,12 +3543,12 @@ EOF fi echo $ac_n "checking for d_off in dirent""... $ac_c" 1>&6 -echo "configure:3468: checking for d_off in dirent" >&5 +echo "configure:3547: checking for d_off in dirent" >&5 if eval "test \"\${ac_cv_dirent_d_off+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3473 "configure" +#line 3552 "configure" #include "confdefs.h" #include <unistd.h> @@ -3479,7 +3558,7 @@ int main() { struct dirent d; d.d_off; ; return 0; } EOF -if { (eval echo configure:3483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_dirent_d_off=yes else @@ -3500,12 +3579,12 @@ EOF fi echo $ac_n "checking for ino_t""... $ac_c" 1>&6 -echo "configure:3504: checking for ino_t" >&5 +echo "configure:3583: checking for ino_t" >&5 if eval "test \"\${ac_cv_type_ino_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3509 "configure" +#line 3588 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3535,12 +3614,12 @@ EOF fi echo $ac_n "checking for loff_t""... $ac_c" 1>&6 -echo "configure:3539: checking for loff_t" >&5 +echo "configure:3618: checking for loff_t" >&5 if eval "test \"\${ac_cv_type_loff_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3544 "configure" +#line 3623 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3570,12 +3649,12 @@ EOF fi echo $ac_n "checking for offset_t""... $ac_c" 1>&6 -echo "configure:3574: checking for offset_t" >&5 +echo "configure:3653: checking for offset_t" >&5 if eval "test \"\${ac_cv_type_offset_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3579 "configure" +#line 3658 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3605,12 +3684,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3609: checking for ssize_t" >&5 +echo "configure:3688: checking for ssize_t" >&5 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3614 "configure" +#line 3693 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3640,12 +3719,12 @@ EOF fi echo $ac_n "checking for wchar_t""... $ac_c" 1>&6 -echo "configure:3644: checking for wchar_t" >&5 +echo "configure:3723: checking for wchar_t" >&5 if eval "test \"\${ac_cv_type_wchar_t+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3649 "configure" +#line 3728 "configure" #include "confdefs.h" #include <sys/types.h> #if STDC_HEADERS @@ -3677,7 +3756,7 @@ fi # we need libcups for CUPS support... echo $ac_n "checking for httpConnect in -lcups""... $ac_c" 1>&6 -echo "configure:3681: checking for httpConnect in -lcups" >&5 +echo "configure:3760: checking for httpConnect in -lcups" >&5 ac_lib_var=`echo cups'_'httpConnect | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3685,7 +3764,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcups $LIBS" cat > conftest.$ac_ext <<EOF -#line 3689 "configure" +#line 3768 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3696,7 +3775,7 @@ int main() { httpConnect() ; return 0; } EOF -if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3725,21 +3804,61 @@ fi +echo $ac_n "checking for sig_atomic_t type""... $ac_c" 1>&6 +echo "configure:3809: checking for sig_atomic_t type" >&5 +if eval "test \"\${samba_cv_sig_atomic_t+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 3815 "configure" +#include "confdefs.h" + +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +#include <signal.h> +int main() { +sig_atomic_t i = 0 +; return 0; } +EOF +if { (eval echo configure:3828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_sig_atomic_t=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_sig_atomic_t=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_sig_atomic_t" 1>&6 +if test x"$samba_cv_sig_atomic_t" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SIG_ATOMIC_T_TYPE 1 +EOF + +fi + echo $ac_n "checking for errno in errno.h""... $ac_c" 1>&6 -echo "configure:3730: checking for errno in errno.h" >&5 +echo "configure:3849: checking for errno in errno.h" >&5 if eval "test \"\${samba_cv_errno+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3736 "configure" +#line 3855 "configure" #include "confdefs.h" #include <errno.h> int main() { int i = errno ; return 0; } EOF -if { (eval echo configure:3743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_errno=yes else @@ -3760,21 +3879,95 @@ EOF fi # stupid glibc has the functions but no declaration. grrrr. +echo $ac_n "checking for setresgid declaration""... $ac_c" 1>&6 +echo "configure:3884: checking for setresgid declaration" >&5 +if eval "test \"\${samba_cv_have_setresgid_decl+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + cat > conftest.$ac_ext <<EOF +#line 3890 "configure" +#include "confdefs.h" +#include <unistd.h> +int main() { +int i = (int)setresgid +; return 0; } +EOF +if { (eval echo configure:3897: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + samba_cv_have_setresgid_decl=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + samba_cv_have_setresgid_decl=no +fi +rm -f conftest* +fi + +echo "$ac_t""$samba_cv_have_setresgid_decl" 1>&6 +if test x"$samba_cv_have_setresgid_decl" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SETRESGID_DECL 1 +EOF + +fi + +# and glibc has setresgid under linux but the function does +# nothing until kernel 2.1.44! very dumb. +echo $ac_n "checking for real setresgid""... $ac_c" 1>&6 +echo "configure:3920: checking for real setresgid" >&5 +if eval "test \"\${samba_cv_have_setresgid+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + + if test "$cross_compiling" = yes; then + samba_cv_have_setresgid=cross +else + cat > conftest.$ac_ext <<EOF +#line 3929 "configure" +#include "confdefs.h" +#include <errno.h> +main() { setresgid(1,1,1); setresgid(2,2,2); exit(errno==EPERM?0:1);} +EOF +if { (eval echo configure:3934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_have_setresgid=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_have_setresgid=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_have_setresgid" 1>&6 +if test x"$samba_cv_have_setresgid" = x"yes"; then + cat >> confdefs.h <<\EOF +#define HAVE_SETRESGID 1 +EOF + +fi + +# stupid glibc has the functions but no declaration. grrrr. echo $ac_n "checking for setresuid declaration""... $ac_c" 1>&6 -echo "configure:3765: checking for setresuid declaration" >&5 +echo "configure:3958: checking for setresuid declaration" >&5 if eval "test \"\${samba_cv_have_setresuid_decl+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3771 "configure" +#line 3964 "configure" #include "confdefs.h" #include <unistd.h> int main() { int i = (int)setresuid ; return 0; } EOF -if { (eval echo configure:3778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_have_setresuid_decl=yes else @@ -3796,20 +3989,20 @@ fi # stupid glibc has the functions but no declaration. grrrr. echo $ac_n "checking for crypt declaration""... $ac_c" 1>&6 -echo "configure:3800: checking for crypt declaration" >&5 +echo "configure:3993: checking for crypt declaration" >&5 if eval "test \"\${samba_cv_have_crypt_decl+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3806 "configure" +#line 3999 "configure" #include "confdefs.h" #include <unistd.h> int main() { int i = (int)crypt ; return 0; } EOF -if { (eval echo configure:3813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4006: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_have_crypt_decl=yes else @@ -3832,7 +4025,7 @@ fi # and glibc has setresuid under linux but the function does # nothing until kernel 2.1.44! very dumb. echo $ac_n "checking for real setresuid""... $ac_c" 1>&6 -echo "configure:3836: checking for real setresuid" >&5 +echo "configure:4029: checking for real setresuid" >&5 if eval "test \"\${samba_cv_have_setresuid+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3841,12 +4034,12 @@ else samba_cv_have_setresuid=cross else cat > conftest.$ac_ext <<EOF -#line 3845 "configure" +#line 4038 "configure" #include "confdefs.h" #include <errno.h> main() { setresuid(1,1,1); setresuid(2,2,2); exit(errno==EPERM?0:1);} EOF -if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_setresuid=yes else @@ -3869,7 +4062,7 @@ EOF fi echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -echo "configure:3873: checking for 8-bit clean memcmp" >&5 +echo "configure:4066: checking for 8-bit clean memcmp" >&5 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -3877,7 +4070,7 @@ else ac_cv_func_memcmp_clean=no else cat > conftest.$ac_ext <<EOF -#line 3881 "configure" +#line 4074 "configure" #include "confdefs.h" main() @@ -3887,7 +4080,7 @@ main() } EOF -if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_memcmp_clean=yes else @@ -3910,12 +4103,12 @@ test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}" for ac_func in crypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3914: checking for $ac_func" >&5 +echo "configure:4107: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 3919 "configure" +#line 4112 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -3939,7 +4132,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:3943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3965,7 +4158,7 @@ done if test x"$ac_cv_func_crypt" = x"no"; then echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3969: checking for crypt in -lcrypt" >&5 +echo "configure:4162: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3973,7 +4166,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <<EOF -#line 3977 "configure" +#line 4170 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -3984,7 +4177,7 @@ int main() { crypt() ; return 0; } EOF -if { (eval echo configure:3988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4016,7 +4209,7 @@ fi # might need libdl for this to work if test "$ac_cv_header_security_pam_appl_h" = "yes"; then echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6 -echo "configure:4020: checking for main in -ldl" >&5 +echo "configure:4213: checking for main in -ldl" >&5 ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4024,14 +4217,14 @@ else ac_save_LIBS="$LIBS" LIBS="-ldl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4028 "configure" +#line 4221 "configure" #include "confdefs.h" int main() { main() ; return 0; } EOF -if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4062,12 +4255,12 @@ fi for ac_func in pam_authenticate do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4066: checking for $ac_func" >&5 +echo "configure:4259: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4071 "configure" +#line 4264 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4091,7 +4284,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4117,7 +4310,7 @@ done if test x"$ac_cv_func_pam_authenticate" = x"no"; then echo $ac_n "checking for pam_authenticate in -lpam""... $ac_c" 1>&6 -echo "configure:4121: checking for pam_authenticate in -lpam" >&5 +echo "configure:4314: checking for pam_authenticate in -lpam" >&5 ac_lib_var=`echo pam'_'pam_authenticate | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4125,7 +4318,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lpam $LIBS" cat > conftest.$ac_ext <<EOF -#line 4129 "configure" +#line 4322 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4136,7 +4329,7 @@ int main() { pam_authenticate() ; return 0; } EOF -if { (eval echo configure:4140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4163,18 +4356,18 @@ fi fi ############################################### -# readline requires some curses routines +# test for where we get readline() from if test "$ac_cv_header_readline_h" = "yes" || test "$ac_cv_header_readline_readline_h" = "yes"; then for ac_func in tputs do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4173: checking for $ac_func" >&5 +echo "configure:4366: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4178 "configure" +#line 4371 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4198,7 +4391,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4223,7 +4416,7 @@ fi done echo $ac_n "checking for tputs in -lcurses""... $ac_c" 1>&6 -echo "configure:4227: checking for tputs in -lcurses" >&5 +echo "configure:4420: checking for tputs in -lcurses" >&5 ac_lib_var=`echo curses'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4231,7 +4424,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <<EOF -#line 4235 "configure" +#line 4428 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4242,7 +4435,7 @@ int main() { tputs() ; return 0; } EOF -if { (eval echo configure:4246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4263,7 +4456,7 @@ else fi echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:4267: checking for readline in -lreadline" >&5 +echo "configure:4460: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4271,7 +4464,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lreadline $LIBS" cat > conftest.$ac_ext <<EOF -#line 4275 "configure" +#line 4468 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4282,7 +4475,7 @@ int main() { readline() ; return 0; } EOF -if { (eval echo configure:4286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4310,13 +4503,13 @@ else fi echo $ac_n "checking for filename_completion_function proto""... $ac_c" 1>&6 -echo "configure:4314: checking for filename_completion_function proto" >&5 +echo "configure:4507: checking for filename_completion_function proto" >&5 if eval "test \"\${samba_cv_have_fcf_proto+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4320 "configure" +#line 4513 "configure" #include "confdefs.h" #include <stdio.h> #ifdef HAVE_READLINE_H @@ -4328,7 +4521,7 @@ int main() { filename_completion_function ; return 0; } EOF -if { (eval echo configure:4332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_have_fcf_proto=yes else @@ -4359,12 +4552,12 @@ fi for ac_func in connect do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4363: checking for $ac_func" >&5 +echo "configure:4556: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4368 "configure" +#line 4561 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4388,7 +4581,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4416,7 +4609,7 @@ if test x"$ac_cv_func_connect" = x"no"; then case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl_s""... $ac_c" 1>&6 -echo "configure:4420: checking for printf in -lnsl_s" >&5 +echo "configure:4613: checking for printf in -lnsl_s" >&5 ac_lib_var=`echo nsl_s'_'printf | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4424,7 +4617,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl_s $LIBS" cat > conftest.$ac_ext <<EOF -#line 4428 "configure" +#line 4621 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4435,7 +4628,7 @@ int main() { printf() ; return 0; } EOF -if { (eval echo configure:4439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4466,7 +4659,7 @@ fi case "$LIBS" in *-lnsl*) ;; *) echo $ac_n "checking for printf in -lnsl""... $ac_c" 1>&6 -echo "configure:4470: checking for printf in -lnsl" >&5 +echo "configure:4663: checking for printf in -lnsl" >&5 ac_lib_var=`echo nsl'_'printf | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4474,7 +4667,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <<EOF -#line 4478 "configure" +#line 4671 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4485,7 +4678,7 @@ int main() { printf() ; return 0; } EOF -if { (eval echo configure:4489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4516,7 +4709,7 @@ fi case "$LIBS" in *-lsocket*) ;; *) echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:4520: checking for connect in -lsocket" >&5 +echo "configure:4713: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4524,7 +4717,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <<EOF -#line 4528 "configure" +#line 4721 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4535,7 +4728,7 @@ int main() { connect() ; return 0; } EOF -if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4566,7 +4759,7 @@ fi case "$LIBS" in *-linet*) ;; *) echo $ac_n "checking for connect in -linet""... $ac_c" 1>&6 -echo "configure:4570: checking for connect in -linet" >&5 +echo "configure:4763: checking for connect in -linet" >&5 ac_lib_var=`echo inet'_'connect | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4574,7 +4767,7 @@ else ac_save_LIBS="$LIBS" LIBS="-linet $LIBS" cat > conftest.$ac_ext <<EOF -#line 4578 "configure" +#line 4771 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -4585,7 +4778,7 @@ int main() { connect() ; return 0; } EOF -if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4628,12 +4821,12 @@ fi for ac_func in execl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4632: checking for $ac_func" >&5 +echo "configure:4825: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4637 "configure" +#line 4830 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4657,7 +4850,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4690,12 +4883,12 @@ fi for ac_func in waitpid getcwd strdup strtoul strerror chown chmod chroot do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4694: checking for $ac_func" >&5 +echo "configure:4887: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4699 "configure" +#line 4892 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4719,7 +4912,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4746,12 +4939,12 @@ done for ac_func in fstat strchr utime utimes getrlimit fsync execl bzero memset do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4750: checking for $ac_func" >&5 +echo "configure:4943: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4755 "configure" +#line 4948 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4775,7 +4968,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4802,12 +4995,12 @@ done for ac_func in memmove vsnprintf snprintf setsid glob strpbrk pipe crypt16 getauthuid do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4806: checking for $ac_func" >&5 +echo "configure:4999: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4811 "configure" +#line 5004 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4831,7 +5024,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4858,12 +5051,12 @@ done for ac_func in strftime sigprocmask sigblock sigaction innetgr setnetgrent getnetgrent endnetgrent do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4862: checking for $ac_func" >&5 +echo "configure:5055: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4867 "configure" +#line 5060 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4887,7 +5080,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4914,12 +5107,12 @@ done for ac_func in initgroups select rdchk getgrnam pathconf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4918: checking for $ac_func" >&5 +echo "configure:5111: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4923 "configure" +#line 5116 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4943,7 +5136,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:4947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4970,12 +5163,12 @@ done for ac_func in setuidx setgroups mktime rename ftruncate stat64 fstat64 lstat64 fopen64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4974: checking for $ac_func" >&5 +echo "configure:5167: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 4979 "configure" +#line 5172 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -4999,7 +5192,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5026,12 +5219,12 @@ done for ac_func in atexit grantpt dup2 lseek64 ftruncate64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5030: checking for $ac_func" >&5 +echo "configure:5223: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5035 "configure" +#line 5228 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5055,7 +5248,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5082,12 +5275,12 @@ done for ac_func in fseek64 ftell64 setluid yp_get_default_domain getpwanam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5086: checking for $ac_func" >&5 +echo "configure:5279: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5091 "configure" +#line 5284 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5111,7 +5304,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5135,15 +5328,15 @@ else fi done -for ac_func in srandom random srand rand setenv mmap64 +for ac_func in srandom random srand rand setenv usleep mmap64 strcasecmp fcvt fcvtl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5142: checking for $ac_func" >&5 +echo "configure:5335: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5147 "configure" +#line 5340 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5167,7 +5360,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5191,16 +5384,17 @@ else fi done + # syscall() is needed for smbwrapper. for ac_func in syscall do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5199: checking for $ac_func" >&5 +echo "configure:5393: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5204 "configure" +#line 5398 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5224,7 +5418,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5252,12 +5446,12 @@ done for ac_func in _dup _dup2 _opendir _readdir _seekdir _telldir _closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5256: checking for $ac_func" >&5 +echo "configure:5450: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5261 "configure" +#line 5455 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5281,7 +5475,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5308,12 +5502,12 @@ done for ac_func in __dup __dup2 __opendir __readdir __seekdir __telldir __closedir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5312: checking for $ac_func" >&5 +echo "configure:5506: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5317 "configure" +#line 5511 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5337,7 +5531,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5364,12 +5558,12 @@ done for ac_func in __getcwd _getcwd do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5368: checking for $ac_func" >&5 +echo "configure:5562: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5373 "configure" +#line 5567 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5393,7 +5587,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5420,12 +5614,12 @@ done for ac_func in __xstat __fxstat __lxstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5424: checking for $ac_func" >&5 +echo "configure:5618: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5429 "configure" +#line 5623 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5449,7 +5643,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5476,12 +5670,12 @@ done for ac_func in _stat _lstat _fstat __stat __lstat __fstat do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5480: checking for $ac_func" >&5 +echo "configure:5674: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5485 "configure" +#line 5679 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5505,7 +5699,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5532,12 +5726,12 @@ done for ac_func in _acl __acl _facl __facl _open __open _chdir __chdir do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5536: checking for $ac_func" >&5 +echo "configure:5730: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5541 "configure" +#line 5735 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5561,7 +5755,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5588,12 +5782,12 @@ done for ac_func in _close __close _fchdir __fchdir _fcntl __fcntl do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5592: checking for $ac_func" >&5 +echo "configure:5786: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5597 "configure" +#line 5791 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5617,7 +5811,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5644,12 +5838,12 @@ done for ac_func in getdents _getdents __getdents _lseek __lseek _read __read do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5648: checking for $ac_func" >&5 +echo "configure:5842: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5653 "configure" +#line 5847 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5673,7 +5867,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5700,12 +5894,12 @@ done for ac_func in _write __write _fork __fork do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5704: checking for $ac_func" >&5 +echo "configure:5898: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5709 "configure" +#line 5903 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5729,7 +5923,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5756,12 +5950,12 @@ done for ac_func in _stat64 __stat64 _fstat64 __fstat64 _lstat64 __lstat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5760: checking for $ac_func" >&5 +echo "configure:5954: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5765 "configure" +#line 5959 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5785,7 +5979,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:5983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5812,12 +6006,12 @@ done for ac_func in __sys_llseek llseek _llseek __llseek readdir64 _readdir64 __readdir64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5816: checking for $ac_func" >&5 +echo "configure:6010: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5821 "configure" +#line 6015 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5841,7 +6035,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5868,12 +6062,12 @@ done for ac_func in pread _pread __pread pread64 _pread64 __pread64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5872: checking for $ac_func" >&5 +echo "configure:6066: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5877 "configure" +#line 6071 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5897,7 +6091,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5924,12 +6118,12 @@ done for ac_func in pwrite _pwrite __pwrite pwrite64 _pwrite64 __pwrite64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5928: checking for $ac_func" >&5 +echo "configure:6122: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5933 "configure" +#line 6127 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -5953,7 +6147,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -5980,12 +6174,12 @@ done for ac_func in open64 _open64 __open64 creat64 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:5984: checking for $ac_func" >&5 +echo "configure:6178: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 5989 "configure" +#line 6183 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6009,7 +6203,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6044,12 +6238,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6048: checking for $ac_func" >&5 +echo "configure:6242: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6053 "configure" +#line 6247 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6073,7 +6267,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6098,7 +6292,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6102: checking for putprpwnam in -lsecurity" >&5 +echo "configure:6296: checking for putprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6106,7 +6300,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <<EOF -#line 6110 "configure" +#line 6304 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6117,7 +6311,7 @@ int main() { putprpwnam() ; return 0; } EOF -if { (eval echo configure:6121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6147,12 +6341,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6151: checking for $ac_func" >&5 +echo "configure:6345: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6156 "configure" +#line 6350 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6176,7 +6370,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6207,12 +6401,12 @@ case "$LIBS" in *-lsec*) for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6211: checking for $ac_func" >&5 +echo "configure:6405: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6216 "configure" +#line 6410 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6236,7 +6430,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6261,7 +6455,7 @@ fi done ;; *) echo $ac_n "checking for putprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:6265: checking for putprpwnam in -lsec" >&5 +echo "configure:6459: checking for putprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'putprpwnam | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6269,7 +6463,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 6273 "configure" +#line 6467 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6280,7 +6474,7 @@ int main() { putprpwnam() ; return 0; } EOF -if { (eval echo configure:6284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6310,12 +6504,12 @@ fi for ac_func in putprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6314: checking for $ac_func" >&5 +echo "configure:6508: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6319 "configure" +#line 6513 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6339,7 +6533,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6371,12 +6565,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6375: checking for $ac_func" >&5 +echo "configure:6569: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6380 "configure" +#line 6574 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6400,7 +6594,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6425,7 +6619,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsecurity""... $ac_c" 1>&6 -echo "configure:6429: checking for set_auth_parameters in -lsecurity" >&5 +echo "configure:6623: checking for set_auth_parameters in -lsecurity" >&5 ac_lib_var=`echo security'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6433,7 +6627,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <<EOF -#line 6437 "configure" +#line 6631 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6444,7 +6638,7 @@ int main() { set_auth_parameters() ; return 0; } EOF -if { (eval echo configure:6448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6474,12 +6668,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6478: checking for $ac_func" >&5 +echo "configure:6672: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6483 "configure" +#line 6677 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6503,7 +6697,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6534,12 +6728,12 @@ case "$LIBS" in *-lsec*) for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6538: checking for $ac_func" >&5 +echo "configure:6732: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6543 "configure" +#line 6737 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6563,7 +6757,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6588,7 +6782,7 @@ fi done ;; *) echo $ac_n "checking for set_auth_parameters in -lsec""... $ac_c" 1>&6 -echo "configure:6592: checking for set_auth_parameters in -lsec" >&5 +echo "configure:6786: checking for set_auth_parameters in -lsec" >&5 ac_lib_var=`echo sec'_'set_auth_parameters | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6596,7 +6790,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 6600 "configure" +#line 6794 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6607,7 +6801,7 @@ int main() { set_auth_parameters() ; return 0; } EOF -if { (eval echo configure:6611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6637,12 +6831,12 @@ fi for ac_func in set_auth_parameters do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6641: checking for $ac_func" >&5 +echo "configure:6835: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6646 "configure" +#line 6840 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6666,7 +6860,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6699,12 +6893,12 @@ case "$LIBS" in *-lgen*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6703: checking for $ac_func" >&5 +echo "configure:6897: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6708 "configure" +#line 6902 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6728,7 +6922,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6753,7 +6947,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lgen""... $ac_c" 1>&6 -echo "configure:6757: checking for getspnam in -lgen" >&5 +echo "configure:6951: checking for getspnam in -lgen" >&5 ac_lib_var=`echo gen'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6761,7 +6955,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lgen $LIBS" cat > conftest.$ac_ext <<EOF -#line 6765 "configure" +#line 6959 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6772,7 +6966,7 @@ int main() { getspnam() ; return 0; } EOF -if { (eval echo configure:6776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:6970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6802,12 +6996,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6806: checking for $ac_func" >&5 +echo "configure:7000: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6811 "configure" +#line 7005 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6831,7 +7025,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6863,12 +7057,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6867: checking for $ac_func" >&5 +echo "configure:7061: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6872 "configure" +#line 7066 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6892,7 +7086,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -6917,7 +7111,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:6921: checking for getspnam in -lsecurity" >&5 +echo "configure:7115: checking for getspnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -6925,7 +7119,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <<EOF -#line 6929 "configure" +#line 7123 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -6936,7 +7130,7 @@ int main() { getspnam() ; return 0; } EOF -if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -6966,12 +7160,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:6970: checking for $ac_func" >&5 +echo "configure:7164: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 6975 "configure" +#line 7169 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -6995,7 +7189,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:6999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7026,12 +7220,12 @@ case "$LIBS" in *-lsec*) for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7030: checking for $ac_func" >&5 +echo "configure:7224: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7035 "configure" +#line 7229 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7055,7 +7249,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:7059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7080,7 +7274,7 @@ fi done ;; *) echo $ac_n "checking for getspnam in -lsec""... $ac_c" 1>&6 -echo "configure:7084: checking for getspnam in -lsec" >&5 +echo "configure:7278: checking for getspnam in -lsec" >&5 ac_lib_var=`echo sec'_'getspnam | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7088,7 +7282,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 7092 "configure" +#line 7286 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7099,7 +7293,7 @@ int main() { getspnam() ; return 0; } EOF -if { (eval echo configure:7103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7129,12 +7323,12 @@ fi for ac_func in getspnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7133: checking for $ac_func" >&5 +echo "configure:7327: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7138 "configure" +#line 7332 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7158,7 +7352,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:7162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7190,12 +7384,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7194: checking for $ac_func" >&5 +echo "configure:7388: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7199 "configure" +#line 7393 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7219,7 +7413,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:7223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7244,7 +7438,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsecurity""... $ac_c" 1>&6 -echo "configure:7248: checking for bigcrypt in -lsecurity" >&5 +echo "configure:7442: checking for bigcrypt in -lsecurity" >&5 ac_lib_var=`echo security'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7252,7 +7446,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <<EOF -#line 7256 "configure" +#line 7450 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7263,7 +7457,7 @@ int main() { bigcrypt() ; return 0; } EOF -if { (eval echo configure:7267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7293,12 +7487,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7297: checking for $ac_func" >&5 +echo "configure:7491: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7302 "configure" +#line 7496 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7322,7 +7516,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:7326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7353,12 +7547,12 @@ case "$LIBS" in *-lsec*) for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7357: checking for $ac_func" >&5 +echo "configure:7551: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7362 "configure" +#line 7556 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7382,7 +7576,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:7386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7407,7 +7601,7 @@ fi done ;; *) echo $ac_n "checking for bigcrypt in -lsec""... $ac_c" 1>&6 -echo "configure:7411: checking for bigcrypt in -lsec" >&5 +echo "configure:7605: checking for bigcrypt in -lsec" >&5 ac_lib_var=`echo sec'_'bigcrypt | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7415,7 +7609,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 7419 "configure" +#line 7613 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7426,7 +7620,7 @@ int main() { bigcrypt() ; return 0; } EOF -if { (eval echo configure:7430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7456,12 +7650,12 @@ fi for ac_func in bigcrypt do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7460: checking for $ac_func" >&5 +echo "configure:7654: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7465 "configure" +#line 7659 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7485,7 +7679,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:7489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7517,12 +7711,12 @@ case "$LIBS" in *-lsecurity*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7521: checking for $ac_func" >&5 +echo "configure:7715: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7526 "configure" +#line 7720 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7546,7 +7740,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:7550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7571,7 +7765,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsecurity""... $ac_c" 1>&6 -echo "configure:7575: checking for getprpwnam in -lsecurity" >&5 +echo "configure:7769: checking for getprpwnam in -lsecurity" >&5 ac_lib_var=`echo security'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7579,7 +7773,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsecurity $LIBS" cat > conftest.$ac_ext <<EOF -#line 7583 "configure" +#line 7777 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7590,7 +7784,7 @@ int main() { getprpwnam() ; return 0; } EOF -if { (eval echo configure:7594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7620,12 +7814,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7624: checking for $ac_func" >&5 +echo "configure:7818: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7629 "configure" +#line 7823 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7649,7 +7843,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:7653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7680,12 +7874,12 @@ case "$LIBS" in *-lsec*) for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7684: checking for $ac_func" >&5 +echo "configure:7878: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7689 "configure" +#line 7883 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7709,7 +7903,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:7713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7734,7 +7928,7 @@ fi done ;; *) echo $ac_n "checking for getprpwnam in -lsec""... $ac_c" 1>&6 -echo "configure:7738: checking for getprpwnam in -lsec" >&5 +echo "configure:7932: checking for getprpwnam in -lsec" >&5 ac_lib_var=`echo sec'_'getprpwnam | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7742,7 +7936,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lsec $LIBS" cat > conftest.$ac_ext <<EOF -#line 7746 "configure" +#line 7940 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7753,7 +7947,7 @@ int main() { getprpwnam() ; return 0; } EOF -if { (eval echo configure:7757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:7951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7783,12 +7977,12 @@ fi for ac_func in getprpwnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:7787: checking for $ac_func" >&5 +echo "configure:7981: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 7792 "configure" +#line 7986 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -7812,7 +8006,7 @@ f = $ac_func; ; return 0; } EOF -if { (eval echo configure:7816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -7874,6 +8068,13 @@ EOF #define IRIX 1 EOF + case "$host_os" in + *irix6*) cat >> confdefs.h <<\EOF +#define IRIX6 1 +EOF + + ;; + esac ATTEMPT_WRAP32_BUILD=yes ;; *aix*) cat >> confdefs.h <<\EOF @@ -7884,6 +8085,12 @@ EOF #define HPUX 1 EOF + SHLIBEXT="sl" + # Use special PIC flags for the native HP-UX compiler. + if test $ac_cv_prog_cc_Ae = yes; then + LDSHFLAGS="-b" + PICFLAG="+z" + fi ;; *qnx*) cat >> confdefs.h <<\EOF #define QNX 1 @@ -7904,7 +8111,7 @@ EOF *dgux*) # Extract the first word of "groff", so it can be a program name with args. set dummy groff; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:7908: checking for $ac_word" >&5 +echo "configure:8115: checking for $ac_word" >&5 if eval "test \"\${ac_cv_prog_ROFF+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -7931,7 +8138,7 @@ else fi ;; *sysv4.2*) echo $ac_n "checking for strcasecmp in -lresolv""... $ac_c" 1>&6 -echo "configure:7935: checking for strcasecmp in -lresolv" >&5 +echo "configure:8142: checking for strcasecmp in -lresolv" >&5 ac_lib_var=`echo resolv'_'strcasecmp | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -7939,7 +8146,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <<EOF -#line 7943 "configure" +#line 8150 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -7950,7 +8157,7 @@ int main() { strcasecmp() ; return 0; } EOF -if { (eval echo configure:7954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:8161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -7977,11 +8184,20 @@ else echo "$ac_t""no" 1>&6 fi ;; + *sysv5*) + if test "$GCC" != yes ; then + cat >> confdefs.h <<\EOF +#define HAVE_MEMSET 1 +EOF + + fi + LDSHFLAGS="-G" + ;; esac # try to work out how to produce pic code with this compiler echo $ac_n "checking whether ${CC-cc} accepts -fpic""... $ac_c" 1>&6 -echo "configure:7985: checking whether ${CC-cc} accepts -fpic" >&5 +echo "configure:8201: checking whether ${CC-cc} accepts -fpic" >&5 if eval "test \"\${ac_cv_prog_cc_fpic+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8001,7 +8217,7 @@ if test $ac_cv_prog_cc_fpic = yes; then fi if test x$PICFLAG = x; then echo $ac_n "checking whether ${CC-cc} accepts -Kpic""... $ac_c" 1>&6 -echo "configure:8005: checking whether ${CC-cc} accepts -Kpic" >&5 +echo "configure:8221: checking whether ${CC-cc} accepts -Kpic" >&5 if eval "test \"\${ac_cv_prog_cc_Kpic+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8022,7 +8238,7 @@ echo "$ac_t""$ac_cv_prog_cc_Kpic" 1>&6 fi if test x$PICFLAG = x; then echo $ac_n "checking whether ${CC-cc} accepts -KPIC""... $ac_c" 1>&6 -echo "configure:8026: checking whether ${CC-cc} accepts -KPIC" >&5 +echo "configure:8242: checking whether ${CC-cc} accepts -KPIC" >&5 if eval "test \"\${ac_cv_prog_cc_KPIC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8045,7 +8261,7 @@ fi ################ echo $ac_n "checking for long long""... $ac_c" 1>&6 -echo "configure:8049: checking for long long" >&5 +echo "configure:8265: checking for long long" >&5 if eval "test \"\${samba_cv_have_longlong+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8054,12 +8270,12 @@ if test "$cross_compiling" = yes; then samba_cv_have_longlong=cross else cat > conftest.$ac_ext <<EOF -#line 8058 "configure" +#line 8274 "configure" #include "confdefs.h" #include <stdio.h> main() { long long x = 1000000; x *= x; exit(((x/1000000) == 1000000)? 0: 1); } EOF -if { (eval echo configure:8063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_have_longlong=yes else @@ -8082,7 +8298,7 @@ EOF fi echo $ac_n "checking for 64 bit off_t""... $ac_c" 1>&6 -echo "configure:8086: checking for 64 bit off_t" >&5 +echo "configure:8302: checking for 64 bit off_t" >&5 if eval "test \"\${samba_cv_SIZEOF_OFF_T+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8091,13 +8307,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_OFF_T=cross else cat > conftest.$ac_ext <<EOF -#line 8095 "configure" +#line 8311 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/stat.h> main() { exit((sizeof(off_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_OFF_T=yes else @@ -8120,7 +8336,7 @@ EOF fi echo $ac_n "checking for off64_t""... $ac_c" 1>&6 -echo "configure:8124: checking for off64_t" >&5 +echo "configure:8340: checking for off64_t" >&5 if eval "test \"\${samba_cv_HAVE_OFF64_T+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8129,13 +8345,13 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_OFF64_T=cross else cat > conftest.$ac_ext <<EOF -#line 8133 "configure" +#line 8349 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/stat.h> main() { struct stat64 st; off64_t s; if (sizeof(off_t) == sizeof(off64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_OFF64_T=yes else @@ -8158,7 +8374,7 @@ EOF fi echo $ac_n "checking for 64 bit ino_t""... $ac_c" 1>&6 -echo "configure:8162: checking for 64 bit ino_t" >&5 +echo "configure:8378: checking for 64 bit ino_t" >&5 if eval "test \"\${samba_cv_SIZEOF_INO_T+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8167,13 +8383,13 @@ if test "$cross_compiling" = yes; then samba_cv_SIZEOF_INO_T=cross else cat > conftest.$ac_ext <<EOF -#line 8171 "configure" +#line 8387 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/stat.h> main() { exit((sizeof(ino_t) == 8) ? 0 : 1); } EOF -if { (eval echo configure:8177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_SIZEOF_INO_T=yes else @@ -8196,7 +8412,7 @@ EOF fi echo $ac_n "checking for ino64_t""... $ac_c" 1>&6 -echo "configure:8200: checking for ino64_t" >&5 +echo "configure:8416: checking for ino64_t" >&5 if eval "test \"\${samba_cv_HAVE_INO64_T+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8205,13 +8421,13 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_INO64_T=cross else cat > conftest.$ac_ext <<EOF -#line 8209 "configure" +#line 8425 "configure" #include "confdefs.h" #include <stdio.h> #include <sys/stat.h> main() { struct stat64 st; ino64_t s; if (sizeof(ino_t) == sizeof(ino64_t)) exit(1); exit((lstat64("/dev/null", &st)==0)?0:1); } EOF -if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_INO64_T=yes else @@ -8234,7 +8450,7 @@ EOF fi echo $ac_n "checking for union semun""... $ac_c" 1>&6 -echo "configure:8238: checking for union semun" >&5 +echo "configure:8454: checking for union semun" >&5 if eval "test \"\${samba_cv_HAVE_UNION_SEMUN+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8243,7 +8459,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNION_SEMUN=cross else cat > conftest.$ac_ext <<EOF -#line 8247 "configure" +#line 8463 "configure" #include "confdefs.h" #include <sys/types.h> @@ -8251,7 +8467,7 @@ else #include <sys/sem.h> main() { union semun ss; exit(0); } EOF -if { (eval echo configure:8255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_UNION_SEMUN=yes else @@ -8274,7 +8490,7 @@ EOF fi echo $ac_n "checking for unsigned char""... $ac_c" 1>&6 -echo "configure:8278: checking for unsigned char" >&5 +echo "configure:8494: checking for unsigned char" >&5 if eval "test \"\${samba_cv_HAVE_UNSIGNED_CHAR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8283,12 +8499,12 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_UNSIGNED_CHAR=cross else cat > conftest.$ac_ext <<EOF -#line 8287 "configure" +#line 8503 "configure" #include "confdefs.h" #include <stdio.h> main() { char c; c=250; exit((c > 0)?0:1); } EOF -if { (eval echo configure:8292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_UNSIGNED_CHAR=yes else @@ -8311,13 +8527,13 @@ EOF fi echo $ac_n "checking for sin_len in sock""... $ac_c" 1>&6 -echo "configure:8315: checking for sin_len in sock" >&5 +echo "configure:8531: checking for sin_len in sock" >&5 if eval "test \"\${samba_cv_HAVE_SOCK_SIN_LEN+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8321 "configure" +#line 8537 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/socket.h> @@ -8326,7 +8542,7 @@ int main() { struct sockaddr_in sock; sock.sin_len = sizeof(sock); ; return 0; } EOF -if { (eval echo configure:8330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8546: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_SOCK_SIN_LEN=yes else @@ -8347,13 +8563,13 @@ EOF fi echo $ac_n "checking whether seekdir returns void""... $ac_c" 1>&6 -echo "configure:8351: checking whether seekdir returns void" >&5 +echo "configure:8567: checking whether seekdir returns void" >&5 if eval "test \"\${samba_cv_SEEKDIR_RETURNS_VOID+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8357 "configure" +#line 8573 "configure" #include "confdefs.h" #include <sys/types.h> #include <dirent.h> @@ -8362,7 +8578,7 @@ int main() { return 0; ; return 0; } EOF -if { (eval echo configure:8366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_SEEKDIR_RETURNS_VOID=yes else @@ -8383,20 +8599,20 @@ EOF fi echo $ac_n "checking for __FILE__ macro""... $ac_c" 1>&6 -echo "configure:8387: checking for __FILE__ macro" >&5 +echo "configure:8603: checking for __FILE__ macro" >&5 if eval "test \"\${samba_cv_HAVE_FILE_MACRO+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8393 "configure" +#line 8609 "configure" #include "confdefs.h" #include <stdio.h> int main() { printf("%s\n", __FILE__); ; return 0; } EOF -if { (eval echo configure:8400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8616: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FILE_MACRO=yes else @@ -8417,20 +8633,20 @@ EOF fi echo $ac_n "checking for __FUNCTION__ macro""... $ac_c" 1>&6 -echo "configure:8421: checking for __FUNCTION__ macro" >&5 +echo "configure:8637: checking for __FUNCTION__ macro" >&5 if eval "test \"\${samba_cv_HAVE_FUNCTION_MACRO+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8427 "configure" +#line 8643 "configure" #include "confdefs.h" #include <stdio.h> int main() { printf("%s\n", __FUNCTION__); ; return 0; } EOF -if { (eval echo configure:8434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_FUNCTION_MACRO=yes else @@ -8451,7 +8667,7 @@ EOF fi echo $ac_n "checking if gettimeofday takes tz argument""... $ac_c" 1>&6 -echo "configure:8455: checking if gettimeofday takes tz argument" >&5 +echo "configure:8671: checking if gettimeofday takes tz argument" >&5 if eval "test \"\${samba_cv_HAVE_GETTIMEOFDAY_TZ+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8460,14 +8676,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_GETTIMEOFDAY_TZ=cross else cat > conftest.$ac_ext <<EOF -#line 8464 "configure" +#line 8680 "configure" #include "confdefs.h" #include <sys/time.h> #include <unistd.h> main() { struct timeval tv; exit(gettimeofday(&tv, NULL));} EOF -if { (eval echo configure:8471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_GETTIMEOFDAY_TZ=yes else @@ -8491,7 +8707,7 @@ fi echo $ac_n "checking for broken readdir""... $ac_c" 1>&6 -echo "configure:8495: checking for broken readdir" >&5 +echo "configure:8711: checking for broken readdir" >&5 if eval "test \"\${samba_cv_HAVE_BROKEN_READDIR+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8500,7 +8716,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_READDIR=cross else cat > conftest.$ac_ext <<EOF -#line 8504 "configure" +#line 8720 "configure" #include "confdefs.h" #include <sys/types.h> #include <dirent.h> @@ -8508,7 +8724,7 @@ main() { struct dirent *di; DIR *d = opendir("."); di = readdir(d); if (di && di->d_name[-2] == '.' && di->d_name[-1] == 0 && di->d_name[0] == 0) exit(0); exit(1);} EOF -if { (eval echo configure:8512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_READDIR=yes else @@ -8531,13 +8747,13 @@ EOF fi echo $ac_n "checking for utimbuf""... $ac_c" 1>&6 -echo "configure:8535: checking for utimbuf" >&5 +echo "configure:8751: checking for utimbuf" >&5 if eval "test \"\${samba_cv_HAVE_UTIMBUF+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8541 "configure" +#line 8757 "configure" #include "confdefs.h" #include <sys/types.h> #include <utime.h> @@ -8545,7 +8761,7 @@ int main() { struct utimbuf tbuf; tbuf.actime = 0; tbuf.modtime = 1; exit(utime("foo.c",&tbuf)); ; return 0; } EOF -if { (eval echo configure:8549: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UTIMBUF=yes else @@ -8566,13 +8782,13 @@ EOF fi echo $ac_n "checking for kernel oplock type definitions""... $ac_c" 1>&6 -echo "configure:8570: checking for kernel oplock type definitions" >&5 +echo "configure:8786: checking for kernel oplock type definitions" >&5 if eval "test \"\${samba_cv_HAVE_KERNEL_OPLOCKS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8576 "configure" +#line 8792 "configure" #include "confdefs.h" #include <sys/types.h> #include <fcntl.h> @@ -8580,7 +8796,7 @@ int main() { oplock_stat_t t; t.os_state = OP_REVOKE; t.os_dev = 1; t.os_ino = 1; ; return 0; } EOF -if { (eval echo configure:8584: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8800: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_KERNEL_OPLOCKS=yes else @@ -8601,7 +8817,7 @@ EOF fi echo $ac_n "checking for irix specific capabilities""... $ac_c" 1>&6 -echo "configure:8605: checking for irix specific capabilities" >&5 +echo "configure:8821: checking for irix specific capabilities" >&5 if eval "test \"\${samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8610,7 +8826,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=cross else cat > conftest.$ac_ext <<EOF -#line 8614 "configure" +#line 8830 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/capability.h> @@ -8625,7 +8841,7 @@ main() { } EOF -if { (eval echo configure:8629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:8845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_IRIX_SPECIFIC_CAPABILITIES=yes else @@ -8655,13 +8871,13 @@ fi # echo $ac_n "checking for int16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:8659: checking for int16 typedef included by rpc/rpc.h" >&5 +echo "configure:8875: checking for int16 typedef included by rpc/rpc.h" >&5 if eval "test \"\${samba_cv_HAVE_INT16_FROM_RPC_RPC_H+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8665 "configure" +#line 8881 "configure" #include "confdefs.h" #include <sys/types.h> #if defined(HAVE_RPC_RPC_H) @@ -8671,7 +8887,7 @@ int main() { int16 testvar; ; return 0; } EOF -if { (eval echo configure:8675: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8891: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT16_FROM_RPC_RPC_H=yes else @@ -8692,13 +8908,13 @@ EOF fi echo $ac_n "checking for uint16 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:8696: checking for uint16 typedef included by rpc/rpc.h" >&5 +echo "configure:8912: checking for uint16 typedef included by rpc/rpc.h" >&5 if eval "test \"\${samba_cv_HAVE_UINT16_FROM_RPC_RPC_H+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8702 "configure" +#line 8918 "configure" #include "confdefs.h" #include <sys/types.h> #if defined(HAVE_RPC_RPC_H) @@ -8708,7 +8924,7 @@ int main() { uint16 testvar; ; return 0; } EOF -if { (eval echo configure:8712: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8928: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT16_FROM_RPC_RPC_H=yes else @@ -8729,13 +8945,13 @@ EOF fi echo $ac_n "checking for int32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:8733: checking for int32 typedef included by rpc/rpc.h" >&5 +echo "configure:8949: checking for int32 typedef included by rpc/rpc.h" >&5 if eval "test \"\${samba_cv_HAVE_INT32_FROM_RPC_RPC_H+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8739 "configure" +#line 8955 "configure" #include "confdefs.h" #include <sys/types.h> #if defined(HAVE_RPC_RPC_H) @@ -8745,7 +8961,7 @@ int main() { int32 testvar; ; return 0; } EOF -if { (eval echo configure:8749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:8965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_INT32_FROM_RPC_RPC_H=yes else @@ -8766,13 +8982,13 @@ EOF fi echo $ac_n "checking for uint32 typedef included by rpc/rpc.h""... $ac_c" 1>&6 -echo "configure:8770: checking for uint32 typedef included by rpc/rpc.h" >&5 +echo "configure:8986: checking for uint32 typedef included by rpc/rpc.h" >&5 if eval "test \"\${samba_cv_HAVE_UINT32_FROM_RPC_RPC_H+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 8776 "configure" +#line 8992 "configure" #include "confdefs.h" #include <sys/types.h> #if defined(HAVE_RPC_RPC_H) @@ -8782,7 +8998,7 @@ int main() { uint32 testvar; ; return 0; } EOF -if { (eval echo configure:8786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_HAVE_UINT32_FROM_RPC_RPC_H=yes else @@ -8803,16 +9019,16 @@ EOF fi echo $ac_n "checking for test routines""... $ac_c" 1>&6 -echo "configure:8807: checking for test routines" >&5 +echo "configure:9023: checking for test routines" >&5 if test "$cross_compiling" = yes; then echo "configure: warning: cannot run when cross-compiling" 1>&2 else cat > conftest.$ac_ext <<EOF -#line 8812 "configure" +#line 9028 "configure" #include "confdefs.h" #include "${srcdir-.}/tests/trivial.c" EOF -if { (eval echo configure:8816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "$ac_t""yes" 1>&6 else @@ -8826,7 +9042,7 @@ fi echo $ac_n "checking for ftruncate extend""... $ac_c" 1>&6 -echo "configure:8830: checking for ftruncate extend" >&5 +echo "configure:9046: checking for ftruncate extend" >&5 if eval "test \"\${samba_cv_HAVE_FTRUNCATE_EXTEND+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8835,11 +9051,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FTRUNCATE_EXTEND=cross else cat > conftest.$ac_ext <<EOF -#line 8839 "configure" +#line 9055 "configure" #include "confdefs.h" #include "${srcdir-.}/tests/ftruncate.c" EOF -if { (eval echo configure:8843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FTRUNCATE_EXTEND=yes else @@ -8862,7 +9078,7 @@ EOF fi echo $ac_n "checking for broken getgroups""... $ac_c" 1>&6 -echo "configure:8866: checking for broken getgroups" >&5 +echo "configure:9082: checking for broken getgroups" >&5 if eval "test \"\${samba_cv_HAVE_BROKEN_GETGROUPS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8871,11 +9087,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_BROKEN_GETGROUPS=cross else cat > conftest.$ac_ext <<EOF -#line 8875 "configure" +#line 9091 "configure" #include "confdefs.h" #include "${srcdir-.}/tests/getgroups.c" EOF -if { (eval echo configure:8879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_BROKEN_GETGROUPS=yes else @@ -8898,7 +9114,7 @@ EOF fi echo $ac_n "checking whether getpass should be replaced""... $ac_c" 1>&6 -echo "configure:8902: checking whether getpass should be replaced" >&5 +echo "configure:9118: checking whether getpass should be replaced" >&5 if eval "test \"\${samba_cv_REPLACE_GETPASS+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8906,7 +9122,7 @@ else SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I${srcdir-.}/include -I${srcdir-.}/ubiqx" cat > conftest.$ac_ext <<EOF -#line 8910 "configure" +#line 9126 "configure" #include "confdefs.h" #define REPLACE_GETPASS 1 @@ -8919,7 +9135,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:8923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:9139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_REPLACE_GETPASS=yes else @@ -8942,7 +9158,7 @@ EOF fi echo $ac_n "checking for broken inet_ntoa""... $ac_c" 1>&6 -echo "configure:8946: checking for broken inet_ntoa" >&5 +echo "configure:9162: checking for broken inet_ntoa" >&5 if eval "test \"\${samba_cv_REPLACE_INET_NTOA+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8951,7 +9167,7 @@ if test "$cross_compiling" = yes; then samba_cv_REPLACE_INET_NTOA=cross else cat > conftest.$ac_ext <<EOF -#line 8955 "configure" +#line 9171 "configure" #include "confdefs.h" #include <stdio.h> @@ -8963,7 +9179,7 @@ if (strcmp(inet_ntoa(ip),"18.52.86.120") && strcmp(inet_ntoa(ip),"120.86.52.18")) { exit(0); } exit(1);} EOF -if { (eval echo configure:8967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_REPLACE_INET_NTOA=yes else @@ -8986,7 +9202,7 @@ EOF fi echo $ac_n "checking for root""... $ac_c" 1>&6 -echo "configure:8990: checking for root" >&5 +echo "configure:9206: checking for root" >&5 if eval "test \"\${samba_cv_HAVE_ROOT+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -8995,11 +9211,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_ROOT=cross else cat > conftest.$ac_ext <<EOF -#line 8999 "configure" +#line 9215 "configure" #include "confdefs.h" main() { exit(getuid() != 0); } EOF -if { (eval echo configure:9003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_ROOT=yes else @@ -9025,7 +9241,7 @@ fi netmask=no; echo $ac_n "checking for netmask ifconf""... $ac_c" 1>&6 -echo "configure:9029: checking for netmask ifconf" >&5 +echo "configure:9245: checking for netmask ifconf" >&5 if eval "test \"\${samba_cv_HAVE_NETMASK_IFCONF+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9034,14 +9250,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NETMASK_IFCONF=cross else cat > conftest.$ac_ext <<EOF -#line 9038 "configure" +#line 9254 "configure" #include "confdefs.h" #define HAVE_NETMASK_IFCONF 1 #define AUTOCONF 1 #include "${srcdir-.}/lib/netmask.c" EOF -if { (eval echo configure:9045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NETMASK_IFCONF=yes else @@ -9065,7 +9281,7 @@ fi if test $netmask = no; then echo $ac_n "checking for netmask ifreq""... $ac_c" 1>&6 -echo "configure:9069: checking for netmask ifreq" >&5 +echo "configure:9285: checking for netmask ifreq" >&5 if eval "test \"\${samba_cv_HAVE_NETMASK_IFREQ+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9074,14 +9290,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NETMASK_IFREQ=cross else cat > conftest.$ac_ext <<EOF -#line 9078 "configure" +#line 9294 "configure" #include "confdefs.h" #define HAVE_NETMASK_IFREQ 1 #define AUTOCONF 1 #include "${srcdir-.}/lib/netmask.c" EOF -if { (eval echo configure:9085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NETMASK_IFREQ=yes else @@ -9106,7 +9322,7 @@ fi if test $netmask = no; then echo $ac_n "checking for netmask AIX""... $ac_c" 1>&6 -echo "configure:9110: checking for netmask AIX" >&5 +echo "configure:9326: checking for netmask AIX" >&5 if eval "test \"\${samba_cv_HAVE_NETMASK_AIX+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9115,14 +9331,14 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_NETMASK_AIX=cross else cat > conftest.$ac_ext <<EOF -#line 9119 "configure" +#line 9335 "configure" #include "confdefs.h" #define HAVE_NETMASK_AIX 1 #define AUTOCONF 1 #include "${srcdir-.}/lib/netmask.c" EOF -if { (eval echo configure:9126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_NETMASK_AIX=yes else @@ -9146,7 +9362,7 @@ fi fi echo $ac_n "checking for trapdoor seteuid""... $ac_c" 1>&6 -echo "configure:9150: checking for trapdoor seteuid" >&5 +echo "configure:9366: checking for trapdoor seteuid" >&5 if eval "test \"\${samba_cv_HAVE_TRAPDOOR_UID+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9155,11 +9371,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 9159 "configure" +#line 9375 "configure" #include "confdefs.h" #include "${srcdir-.}/tests/trapdoor.c" EOF -if { (eval echo configure:9163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_TRAPDOOR_UID=no else @@ -9186,7 +9402,7 @@ fi seteuid=no; if test $seteuid = no; then echo $ac_n "checking for setresuid""... $ac_c" 1>&6 -echo "configure:9190: checking for setresuid" >&5 +echo "configure:9406: checking for setresuid" >&5 if eval "test \"\${samba_cv_USE_SETRESUID+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9195,7 +9411,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETRESUID=cross else cat > conftest.$ac_ext <<EOF -#line 9199 "configure" +#line 9415 "configure" #include "confdefs.h" #define AUTOCONF_TEST 1 @@ -9203,7 +9419,7 @@ else #include "confdefs.h" #include "${srcdir-.}/lib/util_sec.c" EOF -if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETRESUID=yes else @@ -9229,7 +9445,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setreuid""... $ac_c" 1>&6 -echo "configure:9233: checking for setreuid" >&5 +echo "configure:9449: checking for setreuid" >&5 if eval "test \"\${samba_cv_USE_SETREUID+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9238,7 +9454,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETREUID=cross else cat > conftest.$ac_ext <<EOF -#line 9242 "configure" +#line 9458 "configure" #include "confdefs.h" #define AUTOCONF_TEST 1 @@ -9246,7 +9462,7 @@ else #include "confdefs.h" #include "${srcdir-.}/lib/util_sec.c" EOF -if { (eval echo configure:9250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETREUID=yes else @@ -9271,7 +9487,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for seteuid""... $ac_c" 1>&6 -echo "configure:9275: checking for seteuid" >&5 +echo "configure:9491: checking for seteuid" >&5 if eval "test \"\${samba_cv_USE_SETEUID+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9280,7 +9496,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETEUID=cross else cat > conftest.$ac_ext <<EOF -#line 9284 "configure" +#line 9500 "configure" #include "confdefs.h" #define AUTOCONF_TEST 1 @@ -9288,7 +9504,7 @@ else #include "confdefs.h" #include "${srcdir-.}/lib/util_sec.c" EOF -if { (eval echo configure:9292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETEUID=yes else @@ -9313,7 +9529,7 @@ fi if test $seteuid = no; then echo $ac_n "checking for setuidx""... $ac_c" 1>&6 -echo "configure:9317: checking for setuidx" >&5 +echo "configure:9533: checking for setuidx" >&5 if eval "test \"\${samba_cv_USE_SETUIDX+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9322,7 +9538,7 @@ if test "$cross_compiling" = yes; then samba_cv_USE_SETUIDX=cross else cat > conftest.$ac_ext <<EOF -#line 9326 "configure" +#line 9542 "configure" #include "confdefs.h" #define AUTOCONF_TEST 1 @@ -9330,7 +9546,7 @@ else #include "confdefs.h" #include "${srcdir-.}/lib/util_sec.c" EOF -if { (eval echo configure:9334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:9550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_USE_SETUIDX=yes else @@ -9353,9 +9569,713 @@ EOF fi fi +################################################ +# look for a method of setting the effective gid +setegid=no; +if test $setegid = no; then +echo $ac_n "checking for setresgid""... $ac_c" 1>&6 +echo "configure:9578: checking for setresgid" >&5 +if eval "test \"\${samba_cv_USE_SETRESGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETRESGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 9587 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETEUID 1 +#define USE_SETRESGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:9596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETRESGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETRESGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETRESGID" 1>&6 +if test x"$samba_cv_USE_SETRESGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETRESGID 1 +EOF + +fi +fi + + +if test $setegid = no; then +echo $ac_n "checking for setregid""... $ac_c" 1>&6 +echo "configure:9622: checking for setregid" >&5 +if eval "test \"\${samba_cv_USE_SETREGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETREGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 9631 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETRESUID 1 +#define USE_SETREGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:9640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETREGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETREGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETREGID" 1>&6 +if test x"$samba_cv_USE_SETREGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETREGID 1 +EOF + +fi +fi + +if test $setegid = no; then +echo $ac_n "checking for setegid""... $ac_c" 1>&6 +echo "configure:9665: checking for setegid" >&5 +if eval "test \"\${samba_cv_USE_SETEGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETEGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 9674 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETREUID 1 +#define USE_SETEGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:9683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETEGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETEGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETEGID" 1>&6 +if test x"$samba_cv_USE_SETEGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETEGID 1 +EOF + +fi +fi + +if test $setegid = no; then +echo $ac_n "checking for setgidx""... $ac_c" 1>&6 +echo "configure:9708: checking for setgidx" >&5 +if eval "test \"\${samba_cv_USE_SETGIDX+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETGIDX=cross +else + cat > conftest.$ac_ext <<EOF +#line 9717 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETUIDX 1 +#define USE_SETGIDX 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:9726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETGIDX=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETGIDX=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETGIDX" 1>&6 +if test x"$samba_cv_USE_SETGIDX" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETGIDX 1 +EOF + +fi +fi + +################################################ +# look for a method of setting the effective gid +setegid=no; +if test $setegid = no; then +echo $ac_n "checking for setresgid""... $ac_c" 1>&6 +echo "configure:9754: checking for setresgid" >&5 +if eval "test \"\${samba_cv_USE_SETRESGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETRESGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 9763 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETEUID 1 +#define USE_SETRESGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:9772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETRESGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETRESGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETRESGID" 1>&6 +if test x"$samba_cv_USE_SETRESGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETRESGID 1 +EOF + +fi +fi + + +if test $setegid = no; then +echo $ac_n "checking for setregid""... $ac_c" 1>&6 +echo "configure:9798: checking for setregid" >&5 +if eval "test \"\${samba_cv_USE_SETREGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETREGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 9807 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETRESUID 1 +#define USE_SETREGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:9816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETREGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETREGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETREGID" 1>&6 +if test x"$samba_cv_USE_SETREGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETREGID 1 +EOF + +fi +fi + +if test $setegid = no; then +echo $ac_n "checking for setegid""... $ac_c" 1>&6 +echo "configure:9841: checking for setegid" >&5 +if eval "test \"\${samba_cv_USE_SETEGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETEGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 9850 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETREUID 1 +#define USE_SETEGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:9859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETEGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETEGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETEGID" 1>&6 +if test x"$samba_cv_USE_SETEGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETEGID 1 +EOF + +fi +fi + +if test $setegid = no; then +echo $ac_n "checking for setgidx""... $ac_c" 1>&6 +echo "configure:9884: checking for setgidx" >&5 +if eval "test \"\${samba_cv_USE_SETGIDX+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETGIDX=cross +else + cat > conftest.$ac_ext <<EOF +#line 9893 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETUIDX 1 +#define USE_SETGIDX 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:9902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETGIDX=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETGIDX=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETGIDX" 1>&6 +if test x"$samba_cv_USE_SETGIDX" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETGIDX 1 +EOF + +fi +fi + +################################################ +# look for a method of setting the effective gid +setegid=no; +if test $setegid = no; then +echo $ac_n "checking for setresgid""... $ac_c" 1>&6 +echo "configure:9930: checking for setresgid" >&5 +if eval "test \"\${samba_cv_USE_SETRESGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETRESGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 9939 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETEUID 1 +#define USE_SETRESGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:9948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETRESGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETRESGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETRESGID" 1>&6 +if test x"$samba_cv_USE_SETRESGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETRESGID 1 +EOF + +fi +fi + + +if test $setegid = no; then +echo $ac_n "checking for setregid""... $ac_c" 1>&6 +echo "configure:9974: checking for setregid" >&5 +if eval "test \"\${samba_cv_USE_SETREGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETREGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 9983 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETRESUID 1 +#define USE_SETREGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:9992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETREGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETREGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETREGID" 1>&6 +if test x"$samba_cv_USE_SETREGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETREGID 1 +EOF + +fi +fi + +if test $setegid = no; then +echo $ac_n "checking for setegid""... $ac_c" 1>&6 +echo "configure:10017: checking for setegid" >&5 +if eval "test \"\${samba_cv_USE_SETEGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETEGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 10026 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETREUID 1 +#define USE_SETEGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:10035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETEGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETEGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETEGID" 1>&6 +if test x"$samba_cv_USE_SETEGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETEGID 1 +EOF + +fi +fi + +if test $setegid = no; then +echo $ac_n "checking for setgidx""... $ac_c" 1>&6 +echo "configure:10060: checking for setgidx" >&5 +if eval "test \"\${samba_cv_USE_SETGIDX+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETGIDX=cross +else + cat > conftest.$ac_ext <<EOF +#line 10069 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETUIDX 1 +#define USE_SETGIDX 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:10078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETGIDX=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETGIDX=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETGIDX" 1>&6 +if test x"$samba_cv_USE_SETGIDX" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETGIDX 1 +EOF + +fi +fi + +################################################ +# look for a method of setting the effective gid +setegid=no; +if test $setegid = no; then +echo $ac_n "checking for setresgid""... $ac_c" 1>&6 +echo "configure:10106: checking for setresgid" >&5 +if eval "test \"\${samba_cv_USE_SETRESGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETRESGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 10115 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETEUID 1 +#define USE_SETRESGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:10124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETRESGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETRESGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETRESGID" 1>&6 +if test x"$samba_cv_USE_SETRESGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETRESGID 1 +EOF + +fi +fi + + +if test $setegid = no; then +echo $ac_n "checking for setregid""... $ac_c" 1>&6 +echo "configure:10150: checking for setregid" >&5 +if eval "test \"\${samba_cv_USE_SETREGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETREGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 10159 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETRESUID 1 +#define USE_SETREGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:10168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETREGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETREGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETREGID" 1>&6 +if test x"$samba_cv_USE_SETREGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETREGID 1 +EOF + +fi +fi + +if test $setegid = no; then +echo $ac_n "checking for setegid""... $ac_c" 1>&6 +echo "configure:10193: checking for setegid" >&5 +if eval "test \"\${samba_cv_USE_SETEGID+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETEGID=cross +else + cat > conftest.$ac_ext <<EOF +#line 10202 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETREUID 1 +#define USE_SETEGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:10211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETEGID=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETEGID=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETEGID" 1>&6 +if test x"$samba_cv_USE_SETEGID" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETEGID 1 +EOF + +fi +fi + +if test $setegid = no; then +echo $ac_n "checking for setgidx""... $ac_c" 1>&6 +echo "configure:10236: checking for setgidx" >&5 +if eval "test \"\${samba_cv_USE_SETGIDX+set}\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + +if test "$cross_compiling" = yes; then + samba_cv_USE_SETGIDX=cross +else + cat > conftest.$ac_ext <<EOF +#line 10245 "configure" +#include "confdefs.h" + +#define AUTOCONF_TEST 1 +#define USE_SETUIDX 1 +#define USE_SETGIDX 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c" +EOF +if { (eval echo configure:10254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + samba_cv_USE_SETGIDX=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + samba_cv_USE_SETGIDX=no +fi +rm -fr conftest* +fi + +fi + +echo "$ac_t""$samba_cv_USE_SETGIDX" 1>&6 +if test x"$samba_cv_USE_SETGIDX" = x"yes"; then + setegid=yes;cat >> confdefs.h <<\EOF +#define USE_SETGIDX 1 +EOF + +fi +fi + echo $ac_n "checking for shared mmap""... $ac_c" 1>&6 -echo "configure:9359: checking for shared mmap" >&5 +echo "configure:10279: checking for shared mmap" >&5 if eval "test \"\${samba_cv_HAVE_SHARED_MMAP+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9364,11 +10284,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SHARED_MMAP=cross else cat > conftest.$ac_ext <<EOF -#line 9368 "configure" +#line 10288 "configure" #include "confdefs.h" #include "${srcdir-.}/tests/shared_mmap.c" EOF -if { (eval echo configure:9372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SHARED_MMAP=yes else @@ -9395,7 +10315,7 @@ EOF fi echo $ac_n "checking for fcntl locking""... $ac_c" 1>&6 -echo "configure:9399: checking for fcntl locking" >&5 +echo "configure:10319: checking for fcntl locking" >&5 if eval "test \"\${samba_cv_HAVE_FCNTL_LOCK+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9404,11 +10324,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_FCNTL_LOCK=cross else cat > conftest.$ac_ext <<EOF -#line 9408 "configure" +#line 10328 "configure" #include "confdefs.h" #include "${srcdir-.}/tests/fcntl_lock.c" EOF -if { (eval echo configure:9412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_FCNTL_LOCK=yes else @@ -9431,7 +10351,7 @@ EOF fi echo $ac_n "checking for 64 bit fcntl locking""... $ac_c" 1>&6 -echo "configure:9435: checking for 64 bit fcntl locking" >&5 +echo "configure:10355: checking for 64 bit fcntl locking" >&5 if eval "test \"\${samba_cv_HAVE_STRUCT_FLOCK64+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9440,7 +10360,7 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_STRUCT_FLOCK64=cross else cat > conftest.$ac_ext <<EOF -#line 9444 "configure" +#line 10364 "configure" #include "confdefs.h" #include <stdio.h> @@ -9461,7 +10381,7 @@ exit(1); #endif } EOF -if { (eval echo configure:9465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_STRUCT_FLOCK64=yes else @@ -9476,6 +10396,7 @@ fi fi echo "$ac_t""$samba_cv_HAVE_STRUCT_FLOCK64" 1>&6 + if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then cat >> confdefs.h <<\EOF #define HAVE_STRUCT_FLOCK64 1 @@ -9484,7 +10405,7 @@ EOF fi echo $ac_n "checking for sysv ipc""... $ac_c" 1>&6 -echo "configure:9488: checking for sysv ipc" >&5 +echo "configure:10409: checking for sysv ipc" >&5 if eval "test \"\${samba_cv_HAVE_SYSV_IPC+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -9493,11 +10414,11 @@ if test "$cross_compiling" = yes; then samba_cv_HAVE_SYSV_IPC=cross else cat > conftest.$ac_ext <<EOF -#line 9497 "configure" +#line 10418 "configure" #include "confdefs.h" #include "${srcdir-.}/tests/sysv_ipc.c" EOF -if { (eval echo configure:9501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:10422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then samba_cv_HAVE_SYSV_IPC=yes else @@ -9519,11 +10440,11 @@ EOF fi -LOCKDIR='$(BASEDIR)/var' +LOCKDIR='$(VARDIR)/locks' ################################################# # Specify an alternative lock dir echo $ac_n "checking where to put Samba lock files""... $ac_c" 1>&6 -echo "configure:9527: checking where to put Samba lock files" >&5 +echo "configure:10448: checking where to put Samba lock files" >&5 # Check whether --with-lock-dir or --without-lock-dir was given. if test "${with_lock_dir+set}" = set; then withval="$with_lock_dir" @@ -9538,7 +10459,7 @@ echo "$ac_t""$LOCKDIR" 1>&6 ################################################# # decide for the default sam-password-database echo $ac_n "checking which sam password database to use""... $ac_c" 1>&6 -echo "configure:9542: checking which sam password database to use" >&5 +echo "configure:10463: checking which sam password database to use" >&5 # Check whether --with-sam_pwdb or --without-sam_pwdb was given. if test "${with_sam_pwdb+set}" = set; then withval="$with_sam_pwdb" @@ -9574,7 +10495,7 @@ echo "$ac_t""$sampwlibname" 1>&6 ################################################# # check for smbwrapper support echo $ac_n "checking whether to use smbwrapper""... $ac_c" 1>&6 -echo "configure:9578: checking whether to use smbwrapper" >&5 +echo "configure:10499: checking whether to use smbwrapper" >&5 # Check whether --with-smbwrapper or --without-smbwrapper was given. if test "${with_smbwrapper+set}" = set; then withval="$with_smbwrapper" @@ -9618,7 +10539,7 @@ fi ################################################# # check for the AFS filesystem echo $ac_n "checking whether to use AFS""... $ac_c" 1>&6 -echo "configure:9622: checking whether to use AFS" >&5 +echo "configure:10543: checking whether to use AFS" >&5 # Check whether --with-afs or --without-afs was given. if test "${with_afs+set}" = set; then withval="$with_afs" @@ -9644,7 +10565,7 @@ fi ################################################# # check for the DFS auth system echo $ac_n "checking whether to use DFS auth""... $ac_c" 1>&6 -echo "configure:9648: checking whether to use DFS auth" >&5 +echo "configure:10569: checking whether to use DFS auth" >&5 # Check whether --with-dfs or --without-dfs was given. if test "${with_dfs+set}" = set; then withval="$with_dfs" @@ -9669,7 +10590,7 @@ fi ################################################# # check for Kerberos IV auth system echo $ac_n "checking whether to use Kerberos IV""... $ac_c" 1>&6 -echo "configure:9673: checking whether to use Kerberos IV" >&5 +echo "configure:10594: checking whether to use Kerberos IV" >&5 # Check whether --with-krb4 or --without-krb4 was given. if test "${with_krb4+set}" = set; then withval="$with_krb4" @@ -9679,7 +10600,7 @@ if test "${with_krb4+set}" = set; then EOF echo $ac_n "checking for dn_expand in -lresolv""... $ac_c" 1>&6 -echo "configure:9683: checking for dn_expand in -lresolv" >&5 +echo "configure:10604: checking for dn_expand in -lresolv" >&5 ac_lib_var=`echo resolv'_'dn_expand | sed 'y%./+-%__p_%'` if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -9687,7 +10608,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <<EOF -#line 9691 "configure" +#line 10612 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -9698,7 +10619,7 @@ int main() { dn_expand() ; return 0; } EOF -if { (eval echo configure:9702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:10623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -9730,17 +10651,17 @@ fi LDFLAGS="$LDFLAGS -L$withval/lib" ac_safe=`echo "kerberos/krb.h" | sed 'y%./+-%__p_%'` echo $ac_n "checking for kerberos/krb.h""... $ac_c" 1>&6 -echo "configure:9734: checking for kerberos/krb.h" >&5 +echo "configure:10655: checking for kerberos/krb.h" >&5 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9739 "configure" +#line 10660 "configure" #include "confdefs.h" #include <kerberos/krb.h> EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:9744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:10665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -9757,13 +10678,13 @@ fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking whether both krb.h and kerberos/krb.h can be included""... $ac_c" 1>&6 -echo "configure:9761: checking whether both krb.h and kerberos/krb.h can be included" >&5 +echo "configure:10682: checking whether both krb.h and kerberos/krb.h can be included" >&5 if eval "test \"\${samba_cv_no_kerberos_inconsistency+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9767 "configure" +#line 10688 "configure" #include "confdefs.h" #include<kerberos/krb.h> #include<krb.h> @@ -9771,7 +10692,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_no_kerberos_inconsistency=yes else @@ -9787,13 +10708,13 @@ fi echo "$ac_t""$samba_cv_no_kerberos_inconsistency" 1>&6 if test x"$samba_cv_no_kerberos_inconsistency" = x"no"; then echo $ac_n "checking whether a Kerberos define work around is needed""... $ac_c" 1>&6 -echo "configure:9791: checking whether a Kerberos define work around is needed" >&5 +echo "configure:10712: checking whether a Kerberos define work around is needed" >&5 if eval "test \"\${samba_cv_kerberos_define_workaround+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 9797 "configure" +#line 10718 "configure" #include "confdefs.h" #define _KERBEROS_KRB_H #include<kerberos/krb.h> @@ -9802,7 +10723,7 @@ int main() { ; return 0; } EOF -if { (eval echo configure:9806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:10727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* samba_cv_kerberos_define_workaround=yes else @@ -9836,7 +10757,7 @@ fi ################################################# # check for the AFS tickets from srvtabs echo $ac_n "checking whether to use AFS tickets from srvtabs""... $ac_c" 1>&6 -echo "configure:9840: checking whether to use AFS tickets from srvtabs" >&5 +echo "configure:10761: checking whether to use AFS tickets from srvtabs" >&5 # Check whether --with-srvtab or --without-srvtab was given. if test "${with_srvtab+set}" = set; then withval="$with_srvtab" @@ -9870,7 +10791,7 @@ fi ################################################# # check for automount support echo $ac_n "checking whether to use AUTOMOUNT""... $ac_c" 1>&6 -echo "configure:9874: checking whether to use AUTOMOUNT" >&5 +echo "configure:10795: checking whether to use AUTOMOUNT" >&5 # Check whether --with-automount or --without-automount was given. if test "${with_automount+set}" = set; then withval="$with_automount" @@ -9895,7 +10816,7 @@ fi ################################################# # check for smbmount support echo $ac_n "checking whether to use SMBMOUNT""... $ac_c" 1>&6 -echo "configure:9899: checking whether to use SMBMOUNT" >&5 +echo "configure:10820: checking whether to use SMBMOUNT" >&5 # Check whether --with-smbmount or --without-smbmount was given. if test "${with_smbmount+set}" = set; then withval="$with_smbmount" @@ -9923,7 +10844,7 @@ fi ################################################# # check to use a tdb surs database echo $ac_n "checking whether to use SURS tdb database""... $ac_c" 1>&6 -echo "configure:9927: checking whether to use SURS tdb database" >&5 +echo "configure:10848: checking whether to use SURS tdb database" >&5 # Check whether --with-surstdb or --without-surstdb was given. if test "${with_surstdb+set}" = set; then withval="$with_surstdb" @@ -9945,11 +10866,13 @@ else fi +################################################# +# check for a PAM password database ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6 -echo "configure:9953: checking whether to use LDAP password database" >&5 +echo "configure:10876: checking whether to use LDAP password database" >&5 # Check whether --with-ldap or --without-ldap was given. if test "${with_ldap+set}" = set; then withval="$with_ldap" @@ -9975,7 +10898,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6 -echo "configure:9979: checking whether to use LDAP password database" >&5 +echo "configure:10902: checking whether to use LDAP password database" >&5 # Check whether --with-nt5ldap or --without-nt5ldap was given. if test "${with_nt5ldap+set}" = set; then withval="$with_nt5ldap" @@ -10001,7 +10924,7 @@ fi ################################################# # check for a LDAP password database echo $ac_n "checking whether to use LDAP password database""... $ac_c" 1>&6 -echo "configure:10005: checking whether to use LDAP password database" >&5 +echo "configure:10928: checking whether to use LDAP password database" >&5 # Check whether --with-nt5ldap or --without-nt5ldap was given. if test "${with_nt5ldap+set}" = set; then withval="$with_nt5ldap" @@ -10027,7 +10950,7 @@ fi ################################################# # check for a NISPLUS password database echo $ac_n "checking whether to use NISPLUS password database""... $ac_c" 1>&6 -echo "configure:10031: checking whether to use NISPLUS password database" >&5 +echo "configure:10954: checking whether to use NISPLUS password database" >&5 # Check whether --with-nisplus or --without-nisplus was given. if test "${with_nisplus+set}" = set; then withval="$with_nisplus" @@ -10052,7 +10975,7 @@ fi ################################################# # check for a NISPLUS_HOME support echo $ac_n "checking whether to use NISPLUS_HOME""... $ac_c" 1>&6 -echo "configure:10056: checking whether to use NISPLUS_HOME" >&5 +echo "configure:10979: checking whether to use NISPLUS_HOME" >&5 # Check whether --with-nisplus-home or --without-nisplus-home was given. if test "${with_nisplus_home+set}" = set; then withval="$with_nisplus_home" @@ -10077,7 +11000,7 @@ fi ################################################# # check for the secure socket layer echo $ac_n "checking whether to use SSL""... $ac_c" 1>&6 -echo "configure:10081: checking whether to use SSL" >&5 +echo "configure:11004: checking whether to use SSL" >&5 # Check whether --with-ssl or --without-ssl was given. if test "${with_ssl+set}" = set; then withval="$with_ssl" @@ -10102,7 +11025,7 @@ fi ################################################# # check for experimental mmap support echo $ac_n "checking whether to use MMAP""... $ac_c" 1>&6 -echo "configure:10106: checking whether to use MMAP" >&5 +echo "configure:11029: checking whether to use MMAP" >&5 # Check whether --with-mmap or --without-mmap was given. if test "${with_mmap+set}" = set; then withval="$with_mmap" @@ -10127,7 +11050,7 @@ fi ################################################# # check for syslog logging echo $ac_n "checking whether to use syslog logging""... $ac_c" 1>&6 -echo "configure:10131: checking whether to use syslog logging" >&5 +echo "configure:11054: checking whether to use syslog logging" >&5 # Check whether --with-syslog or --without-syslog was given. if test "${with_syslog+set}" = set; then withval="$with_syslog" @@ -10152,7 +11075,7 @@ fi ################################################# # check for a shared memory profiling support echo $ac_n "checking whether to use profiling""... $ac_c" 1>&6 -echo "configure:10156: checking whether to use profiling" >&5 +echo "configure:11079: checking whether to use profiling" >&5 # Check whether --with-profile or --without-profile was given. if test "${with_profile+set}" = set; then withval="$with_profile" @@ -10178,7 +11101,7 @@ fi ################################################# # check for experimental netatalk resource fork support echo $ac_n "checking whether to support netatalk""... $ac_c" 1>&6 -echo "configure:10182: checking whether to support netatalk" >&5 +echo "configure:11105: checking whether to support netatalk" >&5 # Check whether --with-netatalk or --without-netatalk was given. if test "${with_netatalk+set}" = set; then withval="$with_netatalk" @@ -10205,7 +11128,7 @@ fi QUOTAOBJS=noquotas.o echo $ac_n "checking whether to support disk-quotas""... $ac_c" 1>&6 -echo "configure:10209: checking whether to support disk-quotas" >&5 +echo "configure:11132: checking whether to support disk-quotas" >&5 # Check whether --with-quotas or --without-quotas was given. if test "${with_quotas+set}" = set; then withval="$with_quotas" @@ -10228,9 +11151,55 @@ fi ################################################# # check for experimental utmp accounting +echo $ac_n "checking whether to support utmp accounting""... $ac_c" 1>&6 +echo "configure:11156: checking whether to support utmp accounting" >&5 +# Check whether --with-utmp or --without-utmp was given. +if test "${with_utmp+set}" = set; then + withval="$with_utmp" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define WITH_UTMP 1 +EOF + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + ################################################# # check for MS Dfs support +echo $ac_n "checking whether to support MS Dfs""... $ac_c" 1>&6 +echo "configure:11182: checking whether to support MS Dfs" >&5 +# Check whether --with-msdfs or --without-msdfs was given. +if test "${with_msdfs+set}" = set; then + withval="$with_msdfs" + case "$withval" in + yes) + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define MS_DFS 1 +EOF + + ;; + *) + echo "$ac_t""no" 1>&6 + ;; + esac +else + echo "$ac_t""no" 1>&6 + +fi + + ################################################# # set private directory location # Check whether --with-privatedir or --without-privatedir was given. @@ -10261,18 +11230,40 @@ fi ################################################# # set SWAT directory location +# Check whether --with-swatdir or --without-swatdir was given. +if test "${with_swatdir+set}" = set; then + withval="$with_swatdir" + case "$withval" in + yes|no) + # + # Just in case anybody does it + # + echo "configure: warning: --with-swatdir called without argument - will use default" 1>&2 + swatdir='${prefix}/swat' + ;; + * ) + swatdir="$withval" + ;; + esac + +else + swatdir='${prefix}/swat' + + +fi + ################################################# # these tests are taken from the GNU fileutils package echo "checking how to get filesystem space usage" 1>&6 -echo "configure:10269: checking how to get filesystem space usage" >&5 +echo "configure:11260: checking how to get filesystem space usage" >&5 space=no # Test for statvfs64. if test $space = no; then # SVR4 echo $ac_n "checking statvfs64 function (SVR4)""... $ac_c" 1>&6 -echo "configure:10276: checking statvfs64 function (SVR4)" >&5 +echo "configure:11267: checking statvfs64 function (SVR4)" >&5 if eval "test \"\${fu_cv_sys_stat_statvfs64+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10280,7 +11271,7 @@ else fu_cv_sys_stat_statvfs64=cross else cat > conftest.$ac_ext <<EOF -#line 10284 "configure" +#line 11275 "configure" #include "confdefs.h" #if defined(HAVE_UNISTD_H) @@ -10294,7 +11285,7 @@ else exit (statvfs64 (".", &fsd)); } EOF -if { (eval echo configure:10298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statvfs64=yes else @@ -10327,12 +11318,12 @@ fi if test $space = no; then # SVR4 echo $ac_n "checking statvfs function (SVR4)""... $ac_c" 1>&6 -echo "configure:10331: checking statvfs function (SVR4)" >&5 +echo "configure:11322: checking statvfs function (SVR4)" >&5 if eval "test \"\${fu_cv_sys_stat_statvfs+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 10336 "configure" +#line 11327 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/statvfs.h> @@ -10340,7 +11331,7 @@ int main() { struct statvfs fsd; statvfs (0, &fsd); ; return 0; } EOF -if { (eval echo configure:10344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:11335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* fu_cv_sys_stat_statvfs=yes else @@ -10365,7 +11356,7 @@ fi if test $space = no; then # DEC Alpha running OSF/1 echo $ac_n "checking for 3-argument statfs function (DEC OSF/1)""... $ac_c" 1>&6 -echo "configure:10369: checking for 3-argument statfs function (DEC OSF/1)" >&5 +echo "configure:11360: checking for 3-argument statfs function (DEC OSF/1)" >&5 if eval "test \"\${fu_cv_sys_stat_statfs3_osf1+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10373,7 +11364,7 @@ else fu_cv_sys_stat_statfs3_osf1=no else cat > conftest.$ac_ext <<EOF -#line 10377 "configure" +#line 11368 "configure" #include "confdefs.h" #include <sys/param.h> @@ -10386,7 +11377,7 @@ else exit (statfs (".", &fsd, sizeof (struct statfs))); } EOF -if { (eval echo configure:10390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs3_osf1=yes else @@ -10413,7 +11404,7 @@ fi if test $space = no; then # AIX echo $ac_n "checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)""... $ac_c" 1>&6 -echo "configure:10417: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 +echo "configure:11408: checking for two-argument statfs with statfs.bsize member (AIX, 4.3BSD)" >&5 if eval "test \"\${fu_cv_sys_stat_statfs2_bsize+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10421,7 +11412,7 @@ else fu_cv_sys_stat_statfs2_bsize=no else cat > conftest.$ac_ext <<EOF -#line 10425 "configure" +#line 11416 "configure" #include "confdefs.h" #ifdef HAVE_SYS_PARAM_H @@ -10440,7 +11431,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:10444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_bsize=yes else @@ -10467,7 +11458,7 @@ fi if test $space = no; then # SVR3 echo $ac_n "checking for four-argument statfs (AIX-3.2.5, SVR3)""... $ac_c" 1>&6 -echo "configure:10471: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 +echo "configure:11462: checking for four-argument statfs (AIX-3.2.5, SVR3)" >&5 if eval "test \"\${fu_cv_sys_stat_statfs4+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10475,7 +11466,7 @@ else fu_cv_sys_stat_statfs4=no else cat > conftest.$ac_ext <<EOF -#line 10479 "configure" +#line 11470 "configure" #include "confdefs.h" #include <sys/types.h> #include <sys/statfs.h> @@ -10485,7 +11476,7 @@ else exit (statfs (".", &fsd, sizeof fsd, 0)); } EOF -if { (eval echo configure:10489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs4=yes else @@ -10512,7 +11503,7 @@ fi if test $space = no; then # 4.4BSD and NetBSD echo $ac_n "checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)""... $ac_c" 1>&6 -echo "configure:10516: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 +echo "configure:11507: checking for two-argument statfs with statfs.fsize member (4.4BSD and NetBSD)" >&5 if eval "test \"\${fu_cv_sys_stat_statfs2_fsize+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10520,7 +11511,7 @@ else fu_cv_sys_stat_statfs2_fsize=no else cat > conftest.$ac_ext <<EOF -#line 10524 "configure" +#line 11515 "configure" #include "confdefs.h" #include <sys/types.h> #ifdef HAVE_SYS_PARAM_H @@ -10536,7 +11527,7 @@ else exit (statfs (".", &fsd)); } EOF -if { (eval echo configure:10540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_statfs2_fsize=yes else @@ -10563,7 +11554,7 @@ fi if test $space = no; then # Ultrix echo $ac_n "checking for two-argument statfs with struct fs_data (Ultrix)""... $ac_c" 1>&6 -echo "configure:10567: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 +echo "configure:11558: checking for two-argument statfs with struct fs_data (Ultrix)" >&5 if eval "test \"\${fu_cv_sys_stat_fs_data+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -10571,7 +11562,7 @@ else fu_cv_sys_stat_fs_data=no else cat > conftest.$ac_ext <<EOF -#line 10575 "configure" +#line 11566 "configure" #include "confdefs.h" #include <sys/types.h> #ifdef HAVE_SYS_PARAM_H @@ -10591,7 +11582,7 @@ else exit (statfs (".", &fsd) != 1); } EOF -if { (eval echo configure:10595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then fu_cv_sys_stat_fs_data=yes else @@ -10620,11 +11611,11 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext <<EOF -#line 10624 "configure" +#line 11615 "configure" #include "confdefs.h" #include "${srcdir-.}/tests/summary.c" EOF -if { (eval echo configure:10628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:11619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then echo "configure OK"; else @@ -10816,6 +11807,7 @@ s%@LOCKDIR@%$LOCKDIR%g s%@SAM_PWDB_LIB@%$SAM_PWDB_LIB%g s%@QUOTAOBJS@%$QUOTAOBJS%g s%@privatedir@%$privatedir%g +s%@swatdir@%$swatdir%g s%@builddir@%$builddir%g CEOF diff --git a/source/configure.in b/source/configure.in index 24315c21d5e..374cfa71655 100644 --- a/source/configure.in +++ b/source/configure.in @@ -40,7 +40,7 @@ AC_SUBST(BROKEN_CC) dnl Check if the C compiler understands volatile (it should, being ANSI). AC_CACHE_CHECK([that the C compiler understands volatile],samba_cv_volatile, [ AC_TRY_COMPILE([#include <sys/types.h>],[volatile int i = 0], - samba_cv_volatile=yes,samba_cv_volatile=no)]) + samba_cv_volatile=yes,samba_cv_volatile=no)]) if test x"$samba_cv_volatile" = x"yes"; then AC_DEFINE(HAVE_VOLATILE) fi @@ -68,6 +68,7 @@ case "$host_os" in # files *at all* unless the -D_LARGE_FILE or -D_LARGE_FILE_API flags are set. # *aix4*) + AC_MSG_RESULT([enabling large file support]) CPPFLAGS="$CPPFLAGS -D_LARGE_FILES" ;; # @@ -80,6 +81,26 @@ case "$host_os" in EOF ) ;; + *hurd*) + AC_MSG_CHECKING([for LFS support]) + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" + AC_TRY_RUN([ +#include <unistd.h> +main () { +#if _LFS64_LARGEFILE == 1 +exit(0); +#else +exit(1); +#endif +}], [GLIBC_LFS_SUPPORT=yes], [GLIBC_LFS_SUPPORT=no], [GLIBC_LFS_SUPPORT=cross]) + CPPFLAGS="$old_CPPFLAGS" + if test x$GLIBC_LFS_SUPPORT = xyes ; then + CPPFLAGS="-D_LARGEFILE64_SOURCE -D_GNU_SOURCE $CPPFLAGS" + fi + AC_MSG_RESULT([$GLIBC_LFS_SUPPORT]) + ;; + esac AC_INLINE @@ -96,7 +117,18 @@ AC_CHECK_HEADERS(sys/filio.h string.h strings.h stdlib.h sys/socket.h sys/un.h) AC_CHECK_HEADERS(sys/mount.h sys/vfs.h sys/fs/s5param.h sys/filsys.h termios.h) AC_CHECK_HEADERS(sys/statfs.h sys/dustat.h sys/statvfs.h stdarg.h sys/sockio.h) # +# HPUX has a bug in that including shadow.h causes a re-definition of MAXINT. +# This causes configure to fail to detect it. Check for shadow separately on HPUX. # +case "$host_os" in + *hpux*) + AC_TRY_COMPILE([#include <shadow.h>],[struct spwd testme], + ac_cv_header_shadow_h=yes,ac_cv_header_shadow_h=no) + if test x"$ac_cv_header_shadow_h" = x"yes"; then + AC_DEFINE(HAVE_SHADOW_H) + fi + ;; +esac AC_CHECK_HEADERS(shadow.h netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h) AC_CHECK_HEADERS(sys/security.h security/pam_appl.h) AC_CHECK_HEADERS(stropts.h poll.h readline.h history.h readline/readline.h) @@ -134,6 +166,19 @@ AC_CHECK_TYPE(wchar_t, unsigned short) AC_CHECK_LIB(cups,httpConnect) +AC_CACHE_CHECK([for sig_atomic_t type],samba_cv_sig_atomic_t, [ + AC_TRY_COMPILE([ +#include <sys/types.h> +#if STDC_HEADERS +#include <stdlib.h> +#include <stddef.h> +#endif +#include <signal.h>],[sig_atomic_t i = 0], + samba_cv_sig_atomic_t=yes,samba_cv_sig_atomic_t=no)]) +if test x"$samba_cv_sig_atomic_t" = x"yes"; then + AC_DEFINE(HAVE_SIG_ATOMIC_T_TYPE) +fi + AC_CACHE_CHECK([for errno in errno.h],samba_cv_errno, [ AC_TRY_COMPILE([#include <errno.h>],[int i = errno], samba_cv_errno=yes,samba_cv_have_errno=no)]) @@ -142,6 +187,24 @@ if test x"$samba_cv_errno" = x"yes"; then fi # stupid glibc has the functions but no declaration. grrrr. +AC_CACHE_CHECK([for setresgid declaration],samba_cv_have_setresgid_decl,[ + AC_TRY_COMPILE([#include <unistd.h>],[int i = (int)setresgid], + samba_cv_have_setresgid_decl=yes,samba_cv_have_setresgid_decl=no)]) +if test x"$samba_cv_have_setresgid_decl" = x"yes"; then + AC_DEFINE(HAVE_SETRESGID_DECL) +fi + +# and glibc has setresgid under linux but the function does +# nothing until kernel 2.1.44! very dumb. +AC_CACHE_CHECK([for real setresgid],samba_cv_have_setresgid,[ + AC_TRY_RUN([#include <errno.h> +main() { setresgid(1,1,1); setresgid(2,2,2); exit(errno==EPERM?0:1);}], + samba_cv_have_setresgid=yes,samba_cv_have_setresgid=no,samba_cv_have_setresgid=cross)]) +if test x"$samba_cv_have_setresgid" = x"yes"; then + AC_DEFINE(HAVE_SETRESGID) +fi + +# stupid glibc has the functions but no declaration. grrrr. AC_CACHE_CHECK([for setresuid declaration],samba_cv_have_setresuid_decl,[ AC_TRY_COMPILE([#include <unistd.h>],[int i = (int)setresuid], samba_cv_have_setresuid_decl=yes,samba_cv_have_setresuid_decl=no)]) @@ -191,7 +254,7 @@ if test x"$ac_cv_func_pam_authenticate" = x"no"; then fi ############################################### -# readline requires some curses routines +# test for where we get readline() from if test "$ac_cv_header_readline_h" = "yes" || test "$ac_cv_header_readline_readline_h" = "yes"; then AC_CHECK_FUNCS(tputs) @@ -261,7 +324,8 @@ AC_CHECK_FUNCS(initgroups select rdchk getgrnam pathconf) AC_CHECK_FUNCS(setuidx setgroups mktime rename ftruncate stat64 fstat64 lstat64 fopen64) AC_CHECK_FUNCS(atexit grantpt dup2 lseek64 ftruncate64) AC_CHECK_FUNCS(fseek64 ftell64 setluid yp_get_default_domain getpwanam) -AC_CHECK_FUNCS(srandom random srand rand setenv mmap64) +AC_CHECK_FUNCS(srandom random srand rand setenv usleep mmap64 strcasecmp fcvt fcvtl) + # syscall() is needed for smbwrapper. AC_CHECK_FUNCS(syscall) @@ -326,10 +390,20 @@ case "$host_os" in *bsd*) LDSHFLAGS="-shared -Bshareable" ;; *irix*) AC_DEFINE(IRIX) + case "$host_os" in + *irix6*) AC_DEFINE(IRIX6) + ;; + esac ATTEMPT_WRAP32_BUILD=yes ;; *aix*) AC_DEFINE(AIX);; *hpux*) AC_DEFINE(HPUX) + SHLIBEXT="sl" + # Use special PIC flags for the native HP-UX compiler. + if test $ac_cv_prog_cc_Ae = yes; then + LDSHFLAGS="-b" + PICFLAG="+z" + fi ;; *qnx*) AC_DEFINE(QNX);; *osf*) AC_DEFINE(OSF1);; @@ -337,6 +411,12 @@ case "$host_os" in *next2*) AC_DEFINE(NEXT2);; *dgux*) AC_CHECK_PROG( ROFF, groff, [groff -etpsR -Tascii -man]);; *sysv4.2*) AC_CHECK_LIB(resolv, strcasecmp);; + *sysv5*) + if [ test "$GCC" != yes ]; then + AC_DEFINE(HAVE_MEMSET) + fi + LDSHFLAGS="-G" + ;; esac # try to work out how to produce pic code with this compiler @@ -722,6 +802,246 @@ if test x"$samba_cv_USE_SETUIDX" = x"yes"; then fi fi +################################################ +# look for a method of setting the effective gid +setegid=no; +if test $setegid = no; then +AC_CACHE_CHECK([for setresgid],samba_cv_USE_SETRESGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETEUID 1 +#define USE_SETRESGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETRESGID=yes,samba_cv_USE_SETRESGID=no,samba_cv_USE_SETRESGID=cross)]) +if test x"$samba_cv_USE_SETRESGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETRESGID) +fi +fi + + +if test $setegid = no; then +AC_CACHE_CHECK([for setregid],samba_cv_USE_SETREGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETRESUID 1 +#define USE_SETREGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETREGID=yes,samba_cv_USE_SETREGID=no,samba_cv_USE_SETREGID=cross)]) +if test x"$samba_cv_USE_SETREGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETREGID) +fi +fi + +if test $setegid = no; then +AC_CACHE_CHECK([for setegid],samba_cv_USE_SETEGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETREUID 1 +#define USE_SETEGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETEGID=yes,samba_cv_USE_SETEGID=no,samba_cv_USE_SETEGID=cross)]) +if test x"$samba_cv_USE_SETEGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETEGID) +fi +fi + +if test $setegid = no; then +AC_CACHE_CHECK([for setgidx],samba_cv_USE_SETGIDX,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETUIDX 1 +#define USE_SETGIDX 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETGIDX=yes,samba_cv_USE_SETGIDX=no,samba_cv_USE_SETGIDX=cross)]) +if test x"$samba_cv_USE_SETGIDX" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETGIDX) +fi +fi + +################################################ +# look for a method of setting the effective gid +setegid=no; +if test $setegid = no; then +AC_CACHE_CHECK([for setresgid],samba_cv_USE_SETRESGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETEUID 1 +#define USE_SETRESGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETRESGID=yes,samba_cv_USE_SETRESGID=no,samba_cv_USE_SETRESGID=cross)]) +if test x"$samba_cv_USE_SETRESGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETRESGID) +fi +fi + + +if test $setegid = no; then +AC_CACHE_CHECK([for setregid],samba_cv_USE_SETREGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETRESUID 1 +#define USE_SETREGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETREGID=yes,samba_cv_USE_SETREGID=no,samba_cv_USE_SETREGID=cross)]) +if test x"$samba_cv_USE_SETREGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETREGID) +fi +fi + +if test $setegid = no; then +AC_CACHE_CHECK([for setegid],samba_cv_USE_SETEGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETREUID 1 +#define USE_SETEGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETEGID=yes,samba_cv_USE_SETEGID=no,samba_cv_USE_SETEGID=cross)]) +if test x"$samba_cv_USE_SETEGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETEGID) +fi +fi + +if test $setegid = no; then +AC_CACHE_CHECK([for setgidx],samba_cv_USE_SETGIDX,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETUIDX 1 +#define USE_SETGIDX 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETGIDX=yes,samba_cv_USE_SETGIDX=no,samba_cv_USE_SETGIDX=cross)]) +if test x"$samba_cv_USE_SETGIDX" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETGIDX) +fi +fi + +################################################ +# look for a method of setting the effective gid +setegid=no; +if test $setegid = no; then +AC_CACHE_CHECK([for setresgid],samba_cv_USE_SETRESGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETEUID 1 +#define USE_SETRESGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETRESGID=yes,samba_cv_USE_SETRESGID=no,samba_cv_USE_SETRESGID=cross)]) +if test x"$samba_cv_USE_SETRESGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETRESGID) +fi +fi + + +if test $setegid = no; then +AC_CACHE_CHECK([for setregid],samba_cv_USE_SETREGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETRESUID 1 +#define USE_SETREGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETREGID=yes,samba_cv_USE_SETREGID=no,samba_cv_USE_SETREGID=cross)]) +if test x"$samba_cv_USE_SETREGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETREGID) +fi +fi + +if test $setegid = no; then +AC_CACHE_CHECK([for setegid],samba_cv_USE_SETEGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETREUID 1 +#define USE_SETEGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETEGID=yes,samba_cv_USE_SETEGID=no,samba_cv_USE_SETEGID=cross)]) +if test x"$samba_cv_USE_SETEGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETEGID) +fi +fi + +if test $setegid = no; then +AC_CACHE_CHECK([for setgidx],samba_cv_USE_SETGIDX,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETUIDX 1 +#define USE_SETGIDX 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETGIDX=yes,samba_cv_USE_SETGIDX=no,samba_cv_USE_SETGIDX=cross)]) +if test x"$samba_cv_USE_SETGIDX" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETGIDX) +fi +fi + +################################################ +# look for a method of setting the effective gid +setegid=no; +if test $setegid = no; then +AC_CACHE_CHECK([for setresgid],samba_cv_USE_SETRESGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETEUID 1 +#define USE_SETRESGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETRESGID=yes,samba_cv_USE_SETRESGID=no,samba_cv_USE_SETRESGID=cross)]) +if test x"$samba_cv_USE_SETRESGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETRESGID) +fi +fi + + +if test $setegid = no; then +AC_CACHE_CHECK([for setregid],samba_cv_USE_SETREGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETRESUID 1 +#define USE_SETREGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETREGID=yes,samba_cv_USE_SETREGID=no,samba_cv_USE_SETREGID=cross)]) +if test x"$samba_cv_USE_SETREGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETREGID) +fi +fi + +if test $setegid = no; then +AC_CACHE_CHECK([for setegid],samba_cv_USE_SETEGID,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETREUID 1 +#define USE_SETEGID 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETEGID=yes,samba_cv_USE_SETEGID=no,samba_cv_USE_SETEGID=cross)]) +if test x"$samba_cv_USE_SETEGID" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETEGID) +fi +fi + +if test $setegid = no; then +AC_CACHE_CHECK([for setgidx],samba_cv_USE_SETGIDX,[ +AC_TRY_RUN([ +#define AUTOCONF_TEST 1 +#define USE_SETUIDX 1 +#define USE_SETGIDX 1 +#include "confdefs.h" +#include "${srcdir-.}/lib/util_sec.c"], + samba_cv_USE_SETGIDX=yes,samba_cv_USE_SETGIDX=no,samba_cv_USE_SETGIDX=cross)]) +if test x"$samba_cv_USE_SETGIDX" = x"yes"; then + setegid=yes;AC_DEFINE(USE_SETGIDX) +fi +fi + AC_CACHE_CHECK([for shared mmap],samba_cv_HAVE_SHARED_MMAP,[ AC_TRY_RUN([#include "${srcdir-.}/tests/shared_mmap.c"], @@ -758,6 +1078,7 @@ exit(1); #endif }], samba_cv_HAVE_STRUCT_FLOCK64=yes,samba_cv_HAVE_STRUCT_FLOCK64=no,samba_cv_HAVE_STRUCT_FLOCK64=cross)]) + if test x"$samba_cv_HAVE_STRUCT_FLOCK64" = x"yes"; then AC_DEFINE(HAVE_STRUCT_FLOCK64) fi @@ -769,7 +1090,7 @@ if test x"$samba_cv_HAVE_SYSV_IPC" = x"yes"; then AC_DEFINE(HAVE_SYSV_IPC) fi -LOCKDIR='$(BASEDIR)/var' +LOCKDIR='$(VARDIR)/locks' ################################################# # Specify an alternative lock dir AC_MSG_CHECKING(where to put Samba lock files) @@ -1001,6 +1322,8 @@ AC_ARG_WITH(surstdb, AC_MSG_RESULT(no) ) +################################################# +# check for a PAM password database ################################################# # check for a LDAP password database @@ -1210,9 +1533,41 @@ AC_SUBST(QUOTAOBJS) ################################################# # check for experimental utmp accounting +AC_MSG_CHECKING(whether to support utmp accounting) +AC_ARG_WITH(utmp, +[ --with-utmp Include experimental utmp accounting + --without-utmp Don't include experimental utmp accounting (default)], +[ case "$withval" in + yes) + AC_MSG_RESULT(yes) + AC_DEFINE(WITH_UTMP) + ;; + *) + AC_MSG_RESULT(no) + ;; + esac ], + AC_MSG_RESULT(no) +) + ################################################# # check for MS Dfs support +AC_MSG_CHECKING(whether to support MS Dfs) +AC_ARG_WITH(msdfs, +[ --with-msdfs Include MS Dfs support + --without-msdfs Don't include MS Dfs support (default)], +[ case "$withval" in + yes) + AC_MSG_RESULT(yes) + AC_DEFINE(MS_DFS) + ;; + *) + AC_MSG_RESULT(no) + ;; + esac ], + AC_MSG_RESULT(no) +) + ################################################# # set private directory location AC_ARG_WITH(privatedir, @@ -1239,6 +1594,24 @@ AC_ARG_WITH(privatedir, ################################################# # set SWAT directory location +AC_ARG_WITH(swatdir, +[ --with-swatdir=DIR Where to put SWAT files ($ac_default_prefix/swat)], +[ case "$withval" in + yes|no) + # + # Just in case anybody does it + # + AC_MSG_WARN([--with-swatdir called without argument - will use default]) + swatdir='${prefix}/swat' + ;; + * ) + swatdir="$withval" + ;; + esac + AC_SUBST(swatdir)], + [swatdir='${prefix}/swat' + AC_SUBST(swatdir)] +) ################################################# # these tests are taken from the GNU fileutils package diff --git a/source/include/config.h.in b/source/include/config.h.in index b98a2f074a9..ee87a2ffa4f 100644 --- a/source/include/config.h.in +++ b/source/include/config.h.in @@ -61,6 +61,7 @@ byte first (like Motorola and SPARC, unlike Intel and VAX). */ #undef WORDS_BIGENDIAN +#undef HAVE_VOLATILE #undef HAVE_BROKEN_READDIR #undef HAVE_ERRNO_DECL #undef HAVE_LONGLONG @@ -68,6 +69,7 @@ #undef HAVE_REMSH #undef HAVE_UNSIGNED_CHAR #undef HAVE_UTIMBUF +#undef HAVE_SIG_ATOMIC_T_TYPE #undef ssize_t #undef ino_t #undef ssize_t @@ -86,19 +88,22 @@ #undef AIX #undef BSD #undef IRIX +#undef IRIX6 #undef HPUX #undef QNX #undef SCO #undef OSF1 #undef NEXT2 +#undef RELIANTUNIX #undef HAVE_SHARED_MMAP +#undef HAVE_MMAP #undef HAVE_SYSV_IPC #undef HAVE_FCNTL_LOCK #undef HAVE_FTRUNCATE_EXTEND +#undef FTRUNCATE_NEEDS_ROOT #undef HAVE_TRAPDOOR_UID #undef HAVE_ROOT #undef HAVE_UNION_SEMUN -#undef HAVE_NETMASK_IFCONF #undef HAVE_GETTIMEOFDAY_TZ #undef HAVE_SOCK_SIN_LEN #undef STAT_READ_FILSYS @@ -109,8 +114,13 @@ #undef STAT_STATFS4 #undef STAT_STATVFS #undef STAT_STATVFS64 +#undef HAVE_PAM_AUTHENTICATE +#undef HAVE_NETMASK_IFCONF #undef HAVE_NETMASK_IFREQ #undef HAVE_NETMASK_AIX +#undef HAVE_IFACE_AIX +#undef HAVE_IFACE_IFCONF +#undef HAVE_IFACE_IFREQ #undef HAVE_CRYPT #undef HAVE_PUTPRPWNAM #undef HAVE_SET_AUTH_PARAMETERS @@ -121,19 +131,23 @@ #undef WITH_LDAP #undef WITH_TDBSURS #undef WITH_NISPLUS +#undef WITH_PAM #undef WITH_NISPLUS_HOME #undef WITH_AUTOMOUNT #undef WITH_SMBMOUNT -#undef HAVE_PAM_AUTHENTICATE #undef HAVE_BROKEN_GETGROUPS #undef REPLACE_GETPASS #undef REPLACE_INET_NTOA #undef HAVE_FILE_MACRO #undef HAVE_FUNCTION_MACRO #undef HAVE_SETRESUID_DECL -#undef HAVE_CRYPT_DECL #undef HAVE_SETRESUID +#undef HAVE_SETRESGID_DECL +#undef HAVE_SETRESGID +#undef HAVE_CRYPT_DECL #undef WITH_NETATALK +#undef WITH_UTMP +#undef MS_DFS #undef HAVE_INO64_T #undef HAVE_STRUCT_FLOCK64 #undef SIZEOF_INO_T @@ -148,23 +162,30 @@ #undef HAVE_INT32_FROM_RPC_RPC_H #undef HAVE_UINT32_FROM_RPC_RPC_H #undef KRB4_AUTH +#undef KRB5_AUTH #undef SEEKDIR_RETURNS_VOID #undef HAVE_DIRENT_D_OFF #undef HAVE_GETSPNAM #undef HAVE_BIGCRYPT #undef HAVE_GETPRPWNAM +#undef HAVE_SHADOW_H +#undef HAVE_MEMSET +#undef USE_BOTH_CRYPT_CALLS +#undef USE_SETEGID +#undef USE_SETRESGID +#undef USE_SETREGID +#undef USE_SETGIDX #undef USE_SETEUID #undef USE_SETRESUID #undef USE_SETREUID #undef USE_SETUIDX +#undef SYSCONF_SC_NGROUPS_MAX #undef USE_KRB4_DEFINE_WORK_AROUND #undef USE_RENEWABLE_AFS_TICKET #undef WITH_NT5LDAP -#undef HAVE_VOLATILE - /* The number of bytes in a int. */ #undef SIZEOF_INT @@ -423,6 +444,12 @@ /* Define if you have the execl function. */ #undef HAVE_EXECL +/* Define if you have the fcvt function. */ +#undef HAVE_FCVT + +/* Define if you have the fcvtl function. */ +#undef HAVE_FCVTL + /* Define if you have the fopen64 function. */ #undef HAVE_FOPEN64 @@ -594,6 +621,9 @@ /* Define if you have the stat64 function. */ #undef HAVE_STAT64 +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + /* Define if you have the strchr function. */ #undef HAVE_STRCHR @@ -618,6 +648,9 @@ /* Define if you have the tputs function. */ #undef HAVE_TPUTS +/* Define if you have the usleep function. */ +#undef HAVE_USLEEP + /* Define if you have the utime function. */ #undef HAVE_UTIME diff --git a/source/include/proto.h b/source/include/proto.h index 330c4d52601..954d25e7ac1 100644 --- a/source/include/proto.h +++ b/source/include/proto.h @@ -347,12 +347,12 @@ void init_uid(void); BOOL become_uid(uid_t uid); BOOL become_gid(gid_t gid); BOOL unbecome_to_initial_uid(void); -BOOL become_id(uid_t uid,gid_t gid); -BOOL become_unix_sec_ctx(const vuser_key *k, connection_struct *conn, - uid_t new_uid, gid_t new_gid, - int n_groups, gid_t* groups); +BOOL become_id(uid_t uid, gid_t gid); +BOOL become_unix_sec_ctx(const vuser_key * k, connection_struct * conn, + uid_t new_uid, gid_t new_gid, + int n_groups, gid_t * groups); BOOL become_guest(void); -void become_root(BOOL save_dir) ; +void become_root(BOOL save_dir); void unbecome_root(BOOL restore_dir); /*The following definitions come from lib/set_vuid.c */ @@ -1740,6 +1740,8 @@ int lp_machine_password_timeout(void); int lp_change_notify_timeout(void); int lp_stat_cache_size(void); int lp_map_to_guest(void); +int lp_min_passwd_length(void); +int lp_oplock_break_wait_time(void); int lp_ldap_port(void); int lp_ldap_protocol_version(void); char *lp_logon_script(const user_struct* ); @@ -1846,6 +1848,7 @@ void lp_killunused(BOOL (*snumused)(int )); BOOL lp_load(char *pszFname,BOOL global_only, BOOL save_defaults, BOOL add_ipc); int lp_numservices(void); void lp_dump(FILE *f, BOOL show_defaults); +void lp_dump_one(FILE *f, BOOL show_defaults, int snum); int lp_servicenumber(char *pszServiceName); char *volume_label(int snum); void lp_remove_service(int snum); @@ -4202,7 +4205,7 @@ uint32 _samr_delete_dom_user(POLICY_HND *user_pol); /*The following definitions come from smbd/afsticket.c */ int get_afs_ticket_from_srvtab(void); -pid_t get_renewed_ticket(void); +pid_t get_renewed_ticket(connection_struct* conn); /*The following definitions come from smbd/blocking.c */ @@ -4838,17 +4841,20 @@ uint32 _spoolss_getjob( POLICY_HND *handle, uint32 jobid, uint32 level, /*The following definitions come from srvsvcd/srv_srvsvc_nt.c */ -uint32 _srv_net_remote_tod( UNISTR2 *srv_name, TIME_OF_DAY_INFO *tod ); -uint32 _srv_net_srv_get_info( UNISTR2 *srv_name, uint32 switch_value, - SRV_INFO_CTR *ctr); +uint32 _srv_net_remote_tod(UNISTR2 *srv_name, TIME_OF_DAY_INFO *tod); +uint32 _srv_net_srv_get_info(UNISTR2 *srv_name, uint32 switch_value, + SRV_INFO_CTR *ctr); uint32 _srv_net_share_enum( const UNISTR2 *srv_name, uint32 switch_value, SRV_SHARE_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *enum_hnd, uint32 *total_entries, uint32 share_level ); -uint32 _srv_net_sess_enum( const UNISTR2 *srv_name, - uint32 switch_value, SRV_SESS_INFO_CTR *ctr, - uint32 preferred_len, ENUM_HND *enum_hnd, - uint32 *total_entries, uint32 sess_level ); +uint32 _srv_net_share_get_info(const UNISTR2 *srv_name, + const UNISTR2 *share_name, uint32 info_level, + SHARE_INFO_CTR *ctr); +uint32 _srv_net_sess_enum(const UNISTR2 *srv_name, + uint32 switch_value, SRV_SESS_INFO_CTR *ctr, + uint32 preferred_len, ENUM_HND *enum_hnd, + uint32 *total_entries, uint32 sess_level); uint32 _srv_net_conn_enum( const UNISTR2 *srv_name, uint32 switch_value, SRV_CONN_INFO_CTR *ctr, uint32 preferred_len, ENUM_HND *enum_hnd, diff --git a/source/include/rpc_parse_proto.h b/source/include/rpc_parse_proto.h index 2a3bed2b2f3..e51af1fd9a4 100644 --- a/source/include/rpc_parse_proto.h +++ b/source/include/rpc_parse_proto.h @@ -1093,8 +1093,7 @@ BOOL make_srv_share_info2(SH_INFO_2 *sh2, const char *remark, uint32 perms, uint32 max_uses, uint32 num_uses, const char *path, const char *pass); -void srv_free_share_info_ctr(const char *desc, - SHARE_INFO_CTR *info, +void srv_free_share_info_ctr(SHARE_INFO_CTR *info, uint32 info_level, uint32 count); void srv_free_srv_share_ctr(SRV_SHARE_INFO_CTR *ctr); BOOL make_srv_q_net_share_enum(SRV_Q_NET_SHARE_ENUM *q_n, diff --git a/source/include/winbindd_proto.h b/source/include/winbindd_proto.h index ed3b936bb71..649a0732fb4 100644 --- a/source/include/winbindd_proto.h +++ b/source/include/winbindd_proto.h @@ -1052,6 +1052,8 @@ int lp_machine_password_timeout(void); int lp_change_notify_timeout(void); int lp_stat_cache_size(void); int lp_map_to_guest(void); +int lp_min_passwd_length(void); +int lp_oplock_break_wait_time(void); int lp_ldap_port(void); int lp_ldap_protocol_version(void); char *lp_logon_script(const user_struct* ); @@ -1158,6 +1160,7 @@ void lp_killunused(BOOL (*snumused)(int )); BOOL lp_load(char *pszFname,BOOL global_only, BOOL save_defaults, BOOL add_ipc); int lp_numservices(void); void lp_dump(FILE *f, BOOL show_defaults); +void lp_dump_one(FILE *f, BOOL show_defaults, int snum); int lp_servicenumber(char *pszServiceName); char *volume_label(int snum); void lp_remove_service(int snum); diff --git a/source/lib/debug.c b/source/lib/debug.c index 66852a4eca9..c90b28fcd79 100644 --- a/source/lib/debug.c +++ b/source/lib/debug.c @@ -114,7 +114,7 @@ static int debug_count = 0; static int syslog_level = 0; #endif static pstring format_bufr = { '\0' }; -static int format_pos = 0; +static size_t format_pos = 0; /* -------------------------------------------------------------------------- ** @@ -260,11 +260,11 @@ void force_check_log_size( void ) * ************************************************************************** ** */ static void check_log_size( void ) - { +{ int maxlog; SMB_STRUCT_STAT st; - if( debug_count++ < 100 || getuid() != 0 ) + if( debug_count++ < 100 || geteuid() != 0 ) return; maxlog = lp_max_log_size() * 1024; @@ -288,7 +288,7 @@ static void check_log_size( void ) } } debug_count = 0; - } /* check_log_size */ +} /* check_log_size */ /* ************************************************************************** ** * Write an debug message on the debugfile. @@ -315,7 +315,8 @@ va_dcl va_start( ap ); format_str = va_arg( ap, char * ); #endif - (void)vfprintf( dbf, format_str, ap ); + if(dbf) + (void)vfprintf( dbf, format_str, ap ); va_end( ap ); errno = old_errno; return( 0 ); @@ -392,9 +393,11 @@ va_dcl va_start( ap ); format_str = va_arg( ap, char * ); #endif - (void)vfprintf( dbf, format_str, ap ); + if(dbf) + (void)vfprintf( dbf, format_str, ap ); va_end( ap ); - (void)fflush( dbf ); + if(dbf) + (void)fflush( dbf ); } check_log_size(); @@ -439,7 +442,7 @@ static void bufr_print( void ) */ static void format_debug_text( char *msg ) { - int i; + size_t i; BOOL timestamp = (timestamp_log && !stdout_logging && (lp_timestamp_logs() || !(lp_loaded()))); @@ -485,7 +488,8 @@ static void format_debug_text( char *msg ) void dbgflush( void ) { bufr_print(); - (void)fflush( dbf ); + if(dbf) + (void)fflush( dbf ); } /* dbgflush */ /* ************************************************************************** ** @@ -510,10 +514,13 @@ void dbgflush( void ) * * ************************************************************************** ** */ + BOOL dbghdr( int level, char *file, char *func, int line ) - { - if( format_pos ) - { +{ + /* Ensure we don't lose any real errno value. */ + int old_errno = errno; + + if( format_pos ) { /* This is a fudge. If there is stuff sitting in the format_bufr, then * the *right* thing to do is to call * format_debug_text( "\n" ); @@ -524,7 +531,7 @@ BOOL dbghdr( int level, char *file, char *func, int line ) * that a new header is *not* desired. */ return( True ); - } + } #ifdef WITH_SYSLOG /* Set syslog_level. */ @@ -540,12 +547,29 @@ BOOL dbghdr( int level, char *file, char *func, int line ) */ if( timestamp_log && (lp_timestamp_logs() || !(lp_loaded()) )) { + char header_str[200]; + + header_str[0] = '\0'; + + if( lp_debug_pid()) + slprintf(header_str,sizeof(header_str)-1,", pid=%u",(unsigned int)getpid()); + + if( lp_debug_uid()) { + size_t hs_len = strlen(header_str); + slprintf(header_str + hs_len, + sizeof(header_str) - 1 - hs_len, + ", effective(%u, %u), real(%u, %u)", + (unsigned int)geteuid(), (unsigned int)getegid(), + (unsigned int)getuid(), (unsigned int)getgid()); + } + /* Print it all out at once to prevent split syslog output. */ - (void)Debug1("[%s, %d%s] %s:%s(%d)\n", - timestring(lp_debug_hires_timestamp()), level, "", - file, func, line); - } + (void)Debug1( "[%s, %d%s] %s:%s(%d)\n", + timestring(lp_debug_hires_timestamp()), level, + header_str, file, func, line ); + } + errno = old_errno; return( True ); } diff --git a/source/lib/set_uid.c b/source/lib/set_uid.c index be3a92a127e..3b4b191c93d 100644 --- a/source/lib/set_uid.c +++ b/source/lib/set_uid.c @@ -48,24 +48,17 @@ initialise the uid routines ****************************************************************************/ void init_uid(void) { - initial_uid = current_user.uid = geteuid(); - initial_gid = current_user.gid = getegid(); - - if (initial_gid != 0 && initial_uid == 0) { -#ifdef HAVE_SETRESUID - setresgid(0,0,0); -#else - setgid(0); - setegid(0); -#endif - } + current_user.uid = geteuid(); + current_user.gid = getegid(); - initial_uid = geteuid(); - initial_gid = getegid(); + if (current_user.uid != 0 && current_user.gid == 0) + { + gain_root_group_privilege(); + } current_user.conn = NULL; current_user.key.vuid = UID_FIELD_INVALID; - + current_user.ngroups = 0; current_user.groups = NULL; @@ -78,57 +71,30 @@ void init_uid(void) ****************************************************************************/ BOOL become_uid(uid_t uid) { - if (initial_uid != 0) { - return(True); - } - - if (uid == (uid_t)-1 || ((sizeof(uid_t) == 2) && (uid == (uid_t)65535))) { + + if (uid == (uid_t) - 1 + || ((sizeof(uid_t) == 2) && (uid == (uid_t) 65535))) + { static int done; - if (!done) { - DEBUG(1,("WARNING: using uid %d is a security risk\n",(int)uid)); - done=1; + if (!done) + { + DEBUG(1, + ("WARNING: using uid %d is a security risk\n", + (int)uid)); + done = 1; } } -#ifdef HAVE_TRAPDOOR_UID -#ifdef HAVE_SETUIDX - /* AIX3 has setuidx which is NOT a trapoor function (tridge) */ - if (setuidx(ID_EFFECTIVE, uid) != 0) { - if (seteuid(uid) != 0) { - DEBUG(1,("Can't set uid %d (setuidx)\n", (int)uid)); - return False; - } - } -#endif -#endif -#ifdef HAVE_SETRESUID - if (setresuid(-1,uid,-1) != 0) -#else - if ((seteuid(uid) != 0) && - (setuid(uid) != 0)) -#endif - { - DEBUG(0,("Couldn't set uid %d currently set to (%d,%d)\n", - (int)uid,(int)getuid(), (int)geteuid())); - if (uid > (uid_t)32000) { - DEBUG(0,("Looks like your OS doesn't like high uid values - try using a different account\n")); - } - return(False); - } + set_effective_uid(uid); - if (((uid == (uid_t)-1) || ((sizeof(uid_t) == 2) && (uid == 65535))) && (geteuid() != uid)) { - DEBUG(0,("Invalid uid -1. perhaps you have a account with uid 65535?\n")); - return(False); - } - - current_user.uid = uid; + current_user.uid = uid; #ifdef WITH_PROFILE - profile_p->uid_changes++; + profile_p->uid_changes++; #endif - return(True); + return (True); } @@ -137,30 +103,19 @@ BOOL become_uid(uid_t uid) ****************************************************************************/ BOOL become_gid(gid_t gid) { - if (initial_uid != 0) - return(True); - - if (gid == (gid_t)-1 || ((sizeof(gid_t) == 2) && (gid == (gid_t)65535))) { - DEBUG(1,("WARNING: using gid %d is a security risk\n",(int)gid)); - } - -#ifdef HAVE_SETRESUID - if (setresgid(-1,gid,-1) != 0) -#else - if (setgid(gid) != 0) -#endif - { - DEBUG(0,("Couldn't set gid %d currently set to (%d,%d)\n", - (int)gid,(int)getgid(),(int)getegid())); - if (gid > 32000) { - DEBUG(0,("Looks like your OS doesn't like high gid values - try using a different account\n")); + if (gid == (gid_t) - 1 + || ((sizeof(gid_t) == 2) && (gid == (gid_t) 65535))) + { + DEBUG(1, + ("WARNING: using gid %d is a security risk\n", + (int)gid)); } - return(False); - } - current_user.gid = gid; + set_effective_gid(gid); + + current_user.gid = gid; - return(True); + return (True); } /**************************************************************************** @@ -168,75 +123,67 @@ BOOL become_gid(gid_t gid) ****************************************************************************/ BOOL unbecome_to_initial_uid(void) { - dos_ChDir(OriginalDir); - - if (initial_uid == 0) - { -#ifdef HAVE_SETRESUID - setresuid(-1,getuid(),-1); - setresgid(-1,getgid(),-1); -#else - if (seteuid(initial_uid) != 0) - setuid(initial_uid); - setgid(initial_gid); -#endif - } - -#ifdef NO_EID - if (initial_uid == 0) - DEBUG(2,("Running with no EID\n")); - initial_uid = getuid(); - initial_gid = getgid(); -#else - if (geteuid() != initial_uid) { - DEBUG(0,("Warning: You appear to have a trapdoor uid system\n")); - initial_uid = geteuid(); - } - if (getegid() != initial_gid) { - DEBUG(0,("Warning: You appear to have a trapdoor gid system\n")); - initial_gid = getegid(); - } -#endif + if (!current_user.conn) + return (False); - current_user.uid = initial_uid; - current_user.gid = initial_gid; - - if (dos_ChDir(OriginalDir) != 0) - DEBUG( 0, ( "chdir(%s) failed in unbecome_to_initial_uid\n", OriginalDir) ); + dos_ChDir(OriginalDir); - DEBUG(5,("unbecome_to_initial_uid now uid=(%d,%d) gid=(%d,%d)\n", - (int)getuid(),(int)geteuid(),(int)getgid(),(int)getegid())); + set_effective_uid(0); + set_effective_gid(0); - current_user.conn = NULL; - current_user.key.vuid = UID_FIELD_INVALID; + if (geteuid() != 0) + { + DEBUG(0, + ("Warning: You appear to have a trapdoor uid system\n")); + } + if (getegid() != 0) + { + DEBUG(0, + ("Warning: You appear to have a trapdoor gid system\n")); + } + + current_user.uid = 0; + current_user.gid = 0; - return(True); + if (dos_ChDir(OriginalDir) != 0) + DEBUG(0, + ("chdir(%s) failed in unbecome_user\n", OriginalDir)); + + DEBUG(5, ("unbecome_user now uid=(%d,%d) gid=(%d,%d)\n", + (int)getuid(), (int)geteuid(), (int)getgid(), + (int)getegid())); + + current_user.conn = NULL; + current_user.key.vuid = UID_FIELD_INVALID; + + + return (True); } /**************************************************************************** become the specified uid and gid ****************************************************************************/ -BOOL become_id(uid_t uid,gid_t gid) +BOOL become_id(uid_t uid, gid_t gid) { - return(become_gid(gid) && become_uid(uid)); + return (become_gid(gid) && become_uid(uid)); } /**************************************************************************** become the user of a connection number ****************************************************************************/ -BOOL become_unix_sec_ctx(const vuser_key *k, connection_struct *conn, - uid_t new_uid, gid_t new_gid, - int n_groups, gid_t* groups) +BOOL become_unix_sec_ctx(const vuser_key * k, connection_struct * conn, + uid_t new_uid, gid_t new_gid, + int n_groups, gid_t * groups) { gid_t gid; uid_t uid; if (current_user.uid == new_uid && - current_user.key.pid == k->pid && - current_user.key.vuid == k->vuid) + current_user.key.pid == k->pid && + current_user.key.vuid == k->vuid) { - DEBUG(4,("Skipping become_unix_sec_ctx - already user\n")); - return(True); + DEBUG(4, ("Skipping become_unix_sec_ctx - already user\n")); + return (True); } unbecome_to_initial_uid(); @@ -244,52 +191,55 @@ BOOL become_unix_sec_ctx(const vuser_key *k, connection_struct *conn, uid = new_uid; gid = new_gid; current_user.ngroups = n_groups; - current_user.groups = groups; - - if (initial_uid == 0) - { - if (!become_gid(gid)) return(False); + current_user.groups = groups; -#ifdef HAVE_SETGROUPS - if (!(conn != NULL && conn->ipc)) + if (!become_gid(gid)) + return (False); + +#ifdef HAVE_SETGROUPS + if (!(conn != NULL && conn->ipc)) + { + /* groups stuff added by ih/wreu */ + if (current_user.ngroups > 0) { - /* groups stuff added by ih/wreu */ - if (current_user.ngroups > 0) + if (setgroups(current_user.ngroups, + current_user.groups) < 0) { - if (setgroups(current_user.ngroups, - current_user.groups)<0) { - DEBUG(0,("setgroups call failed!\n")); - } + DEBUG(0, ("setgroups call failed!\n")); } } - {int i; - DEBUG(3, ("Setting %d in %d groups: ", new_uid, n_groups)); - for (i = 0; i < n_groups; i++) - { - DEBUG(3, ("%s%d", (i ? ", " : ""), (int)groups[i])); - } - DEBUG(3, ("\n")); + } + { + int i; + DEBUG(3, ("Setting %d in %d groups: ", new_uid, n_groups)); + for (i = 0; i < n_groups; i++) + { + DEBUG(3, ("%s%d", (i ? ", " : ""), (int)groups[i])); } + DEBUG(3, ("\n")); + } #endif - if (conn == NULL) - { - if (!become_uid(uid)) return False; - } - else - { - if (!conn->admin_user && !become_uid(uid)) return False; - } + if (conn == NULL) + { + if (!become_uid(uid)) + return False; + } + else + { + if (!conn->admin_user && !become_uid(uid)) + return False; } - + current_user.conn = conn; current_user.key = *k; - DEBUG(5,("become_unix_sec_ctx uid=(%d,%d) gid=(%d,%d) vuser=(%d,%x)\n", - (int)getuid(),(int)geteuid(),(int)getgid(),(int)getegid(), - current_user.key.pid, current_user.key.vuid)); - - return(True); + DEBUG(5, + ("become_unix_sec_ctx uid=(%d,%d) gid=(%d,%d) vuser=(%d,%x)\n", + (int)getuid(), (int)geteuid(), (int)getgid(), (int)getegid(), + current_user.key.pid, current_user.key.vuid)); + + return (True); } /**************************************************************************** @@ -297,31 +247,31 @@ become the guest user ****************************************************************************/ BOOL become_guest(void) { - BOOL ret; - const struct passwd *pass=NULL; + BOOL ret; + const struct passwd *pass = NULL; - if (initial_uid != 0) - return(True); - - if (!pass) - pass = Get_Pwnam(lp_guestaccount(-1),True); - if (!pass) return(False); + if (!pass) + pass = Get_Pwnam(lp_guestaccount(-1), True); + if (!pass) + return (False); #ifdef AIX - /* MWW: From AIX FAQ patch to WU-ftpd: call initgroups before setting IDs */ - initgroups(pass->pw_name, (gid_t)pass->pw_gid); + /* MWW: From AIX FAQ patch to WU-ftpd: call initgroups before setting IDs */ + initgroups(pass->pw_name, (gid_t) pass->pw_gid); #endif - ret = become_id(pass->pw_uid,pass->pw_gid); + ret = become_id(pass->pw_uid, pass->pw_gid); - if (!ret) { - DEBUG(1,("Failed to become guest. Invalid guest account?\n")); - } + if (!ret) + { + DEBUG(1, + ("Failed to become guest. Invalid guest account?\n")); + } - current_user.conn = NULL; - current_user.key.vuid = UID_FIELD_INVALID; + current_user.conn = NULL; + current_user.key.vuid = UID_FIELD_INVALID; - return(ret); + return (ret); } static struct current_user current_user_saved; @@ -336,11 +286,11 @@ after the operation Set save_dir if you also need to save/restore the CWD ****************************************************************************/ -void become_root(BOOL save_dir) +void become_root(BOOL save_dir) { if (become_root_depth < 0) { - DEBUG(0,("ERROR: become root depth is negative!\n")); + DEBUG(0, ("ERROR: become root depth is negative!\n")); } if (save_dir) dos_GetWd(become_root_dir); @@ -361,8 +311,8 @@ void unbecome_root(BOOL restore_dir) { if (become_root_depth <= 0) { - DEBUG(0,("ERROR: unbecome root depth is %d\n", - become_root_depth)); + DEBUG(0, ("ERROR: unbecome root depth is %d\n", + become_root_depth)); SMB_ASSERT(False); } @@ -370,34 +320,38 @@ void unbecome_root(BOOL restore_dir) if (become_root_depth > 0) { - DEBUG(10,("not yet root: unbecome root depth is %d\n", - become_root_depth)); + DEBUG(10, ("not yet root: unbecome root depth is %d\n", + become_root_depth)); return; } /* we might have done a become_user() while running as root, if we have then become root again in order to become non root! */ - if (current_user.uid != 0) { + if (current_user.uid != 0) + { become_uid(0); } /* restore our gid first */ - if (!become_gid(current_user_saved.gid)) { - DEBUG(0,("ERROR: Failed to restore gid\n")); + if (!become_gid(current_user_saved.gid)) + { + DEBUG(0, ("ERROR: Failed to restore gid\n")); exit_server("Failed to restore gid"); } -#ifdef HAVE_SETGROUPS - if (current_user_saved.ngroups > 0) { +#ifdef HAVE_SETGROUPS + if (current_user_saved.ngroups > 0) + { if (setgroups(current_user_saved.ngroups, - current_user_saved.groups)<0) - DEBUG(0,("ERROR: setgroups call failed!\n")); + current_user_saved.groups) < 0) + DEBUG(0, ("ERROR: setgroups call failed!\n")); } #endif /* now restore our uid */ - if (!become_uid(current_user_saved.uid)) { - DEBUG(0,("ERROR: Failed to restore uid\n")); + if (!become_uid(current_user_saved.uid)) + { + DEBUG(0, ("ERROR: Failed to restore uid\n")); exit_server("Failed to restore uid"); } diff --git a/source/lib/sids.c b/source/lib/sids.c index 346081d09d0..a7a4aaccd4d 100644 --- a/source/lib/sids.c +++ b/source/lib/sids.c @@ -67,7 +67,7 @@ extern fstring global_myworkgroup; DOM_SID global_sid_S_1_5_20; /* local well-known domain */ DOM_SID global_sid_S_1_1; /* Global Domain */ -static DOM_SID global_sid_S_1_3; /* Creator Owner */ +static DOM_SID global_sid_S_1_3_0; /* Creator Owner */ DOM_SID global_sid_S_1_5; /* NT Authority */ DOM_SID global_sid_system; /* NT System */ static DOM_SID global_sid_S_1_1_0; /* everyone */ @@ -87,11 +87,11 @@ static const struct sid_map static_sid_name_map[] = { &global_sid_S_1_5_20, "BUILTIN" }, /* SID_NAME_DOMAIN */ { &global_sid_S_1_1 , "Global Domain" }, { &global_sid_S_1_1_0 , "Everyone" }, /* SID_NAME_WKN_GRP */ - { &global_sid_S_1_3 , "Creator Owner" }, + { &global_sid_S_1_3_0 , "Creator Owner" }, /* SID_NAME_WKN_GRP */ { &global_sid_S_1_5 , "NT Authority" }, /* SID_NAME_DOMAIN */ { &global_sid_system , "SYSTEM" }, /* SID_NAME_WKN_GRP */ - { &global_sam_sid , global_sam_name }, - { &global_member_sid , global_myworkgroup }, + { &global_sam_sid , global_sam_name }, /* SID_NAME_DOMAIN */ + { &global_member_sid , global_myworkgroup }, /* SID_NAME_DOMAIN */ { NULL , NULL } }; @@ -230,9 +230,9 @@ void generate_wellknown_sids(void) string_to_sid(&global_sid_S_1_5_20, "S-1-5-32"); string_to_sid(&global_sid_S_1_1 , "S-1-1" ); string_to_sid(&global_sid_S_1_1_0 , "S-1-1-0" ); - string_to_sid(&global_sid_S_1_3 , "S-1-3" ); + string_to_sid(&global_sid_S_1_3_0 , "S-1-3-0" ); string_to_sid(&global_sid_S_1_5 , "S-1-5" ); - string_to_sid(&global_sid_system , "S-1-5-17"); + string_to_sid(&global_sid_system , "S-1-5-18"); global_sid_everyone = &global_sid_S_1_1_0; global_sid_builtin = &global_sid_S_1_5_20; diff --git a/source/lib/util_sec.c b/source/lib/util_sec.c index 4a2ac2565e6..f7b0915c4d5 100644 --- a/source/lib/util_sec.c +++ b/source/lib/util_sec.c @@ -47,14 +47,20 @@ abort if we haven't set the uid correctly ****************************************************************************/ static void assert_uid(uid_t ruid, uid_t euid) { - if ((euid != (uid_t)-1 && geteuid() != euid) || - (ruid != (uid_t)-1 && getuid() != ruid)) { - DEBUG(0,("Failed to set uid privileges to (%d,%d) now set to (%d,%d)\n", - (int)ruid, (int)euid, - (int)getuid(), (int)geteuid())); +#ifdef AUTOCONF_TEST +#if (defined(USE_SETRESUID) || defined(USE_SETREUID) || \ + defined(USE_SETEUID) || defined(USE_SETUIDX)) + if ((euid != (uid_t) (-1) && geteuid() != euid) || + (ruid != (uid_t) (-1) && getuid() != ruid)) + { + DEBUG(0, + ("Failed to set uid privileges to (%d,%d) now set to (%d,%d)\n", + (int)ruid, (int)euid, (int)getuid(), (int)geteuid())); smb_panic("failed to set uid\n"); exit(1); } +#endif +#endif } /**************************************************************************** @@ -62,15 +68,21 @@ abort if we haven't set the gid correctly ****************************************************************************/ static void assert_gid(gid_t rgid, gid_t egid) { - if ((egid != (gid_t)-1 && getegid() != egid) || - (rgid != (gid_t)-1 && getgid() != rgid)) { - DEBUG(0,("Failed to set gid privileges to (%d,%d) now set to (%d,%d) uid=(%d,%d)\n", - (int)rgid, (int)egid, - (int)getgid(), (int)getegid(), - (int)getuid(), (int)geteuid())); +#ifdef AUTOCONF_TEST +#if (defined(USE_SETRESGID) || defined(USE_SETREGID) || \ + defined(USE_SETEGID) || defined(USE_SETGIDX)) + if ((egid != (gid_t) (-1) && getegid() != egid) || + (rgid != (gid_t) (-1) && getgid() != rgid)) + { + DEBUG(0, + ("Failed to set gid privileges to (%d,%d) now set to (%d,%d) uid=(%d,%d)\n", + (int)rgid, (int)egid, (int)getgid(), (int)getegid(), + (int)getuid(), (int)geteuid())); smb_panic("failed to set gid\n"); exit(1); } +#endif +#endif } /**************************************************************************** @@ -78,20 +90,20 @@ static void assert_gid(gid_t rgid, gid_t egid) We want to end up with ruid==euid==0 ****************************************************************************/ void gain_root_privilege(void) -{ -#if USE_SETRESUID - setresuid(0,0,0); +{ +#ifdef USE_SETRESUID + setresuid(0, 0, 0); #endif - -#if USE_SETEUID + +#ifdef USE_SETEUID seteuid(0); #endif -#if USE_SETREUID +#ifdef USE_SETREUID setreuid(0, 0); #endif -#if USE_SETUIDX +#ifdef USE_SETUIDX setuidx(ID_EFFECTIVE, 0); setuidx(ID_REAL, 0); #endif @@ -109,19 +121,19 @@ void gain_root_privilege(void) ****************************************************************************/ void gain_root_group_privilege(void) { -#if USE_SETRESUID - setresgid(0,0,0); +#ifdef USE_SETRESGID + setresgid(0, 0, 0); #endif -#if USE_SETREUID - setregid(0,0); +#ifdef USE_SETREGID + setregid(0, 0); #endif -#if USE_SETEUID +#ifdef USE_SETEGID setegid(0); #endif -#if USE_SETUIDX +#ifdef USE_SETGIDX setgidx(ID_EFFECTIVE, 0); setgidx(ID_REAL, 0); #endif @@ -138,19 +150,19 @@ void gain_root_group_privilege(void) ****************************************************************************/ void set_effective_uid(uid_t uid) { -#if USE_SETRESUID - setresuid(-1,uid,-1); +#ifdef USE_SETRESUID + setresuid(-1, uid, -1); #endif -#if USE_SETREUID - setreuid(-1,uid); +#ifdef USE_SETREUID + setreuid(-1, uid); #endif -#if USE_SETEUID +#ifdef USE_SETEUID seteuid(uid); #endif -#if USE_SETUIDX +#ifdef USE_SETUIDX setuidx(ID_EFFECTIVE, uid); #endif @@ -163,19 +175,19 @@ void set_effective_uid(uid_t uid) ****************************************************************************/ void set_effective_gid(gid_t gid) { -#if USE_SETRESUID - setresgid(-1,gid,-1); +#ifdef USE_SETRESGID + setresgid(-1, gid, -1); #endif -#if USE_SETREUID - setregid(-1,gid); +#ifdef USE_SETREGID + setregid(-1, gid); #endif -#if USE_SETEUID +#ifdef USE_SETEGID setegid(gid); #endif -#if USE_SETUIDX +#ifdef USE_SETGIDX setgidx(ID_EFFECTIVE, gid); #endif @@ -202,7 +214,8 @@ void restore_re_uid(void) { set_effective_uid(0); set_effective_uid(saved_euid); - if (getuid() != saved_ruid) setuid(saved_ruid); + if (getuid() != saved_ruid) + setuid(saved_ruid); set_effective_uid(saved_euid); assert_uid(saved_ruid, saved_euid); @@ -217,22 +230,22 @@ int set_re_uid(void) { uid_t uid = geteuid(); -#if USE_SETRESUID +#ifdef USE_SETRESUID setresuid(geteuid(), -1, -1); #endif -#if USE_SETREUID +#ifdef USE_SETREUID setreuid(0, 0); setreuid(uid, -1); setreuid(-1, uid); #endif -#if USE_SETEUID +#ifdef USE_SETEUID /* can't be done */ return -1; #endif -#if USE_SETUIDX +#ifdef USE_SETUIDX /* can't be done */ return -1; #endif @@ -256,37 +269,49 @@ void become_user_permanently(uid_t uid, gid_t gid) gain_root_privilege(); gain_root_group_privilege(); -#if USE_SETRESUID - setresgid(gid,gid,gid); +#ifdef USE_SETRESGID + setresgid(gid, gid, gid); setgid(gid); - setresuid(uid,uid,uid); - setuid(uid); #endif -#if USE_SETREUID - setregid(gid,gid); +#ifdef USE_SETREGID + setregid(gid, gid); setgid(gid); - setreuid(uid,uid); - setuid(uid); #endif -#if USE_SETEUID +#ifdef USE_SETEGID setegid(gid); setgid(gid); - setuid(uid); - seteuid(uid); - setuid(uid); #endif -#if USE_SETUIDX +#ifdef USE_SETGIDX setgidx(ID_REAL, gid); setgidx(ID_EFFECTIVE, gid); setgid(gid); +#endif + +#ifdef USE_SETRESUID + setresuid(uid, uid, uid); + setuid(uid); +#endif + +#ifdef USE_SETREUID + setreuid(uid, uid); + setuid(uid); +#endif + +#ifdef USE_SETEUID + setuid(uid); + seteuid(uid); + setuid(uid); +#endif + +#ifdef USE_SETUIDX setuidx(ID_REAL, uid); setuidx(ID_EFFECTIVE, uid); setuid(uid); #endif - + assert_uid(uid, uid); assert_gid(gid, gid); } @@ -294,15 +319,16 @@ void become_user_permanently(uid_t uid, gid_t gid) #ifdef AUTOCONF_TEST main() { - if (getuid() != 0) { + if (getuid() != 0) + { #if (defined(AIX) && defined(USE_SETREUID)) /* setreuid is badly broken on AIX 4.1, we avoid it completely */ - fprintf(stderr,"avoiding possibly broken setreuid\n"); + fprintf(stderr, "avoiding possibly broken setreuid\n"); exit(1); #endif /* assume that if we have the functions then they work */ - fprintf(stderr,"not running as root: assuming OK\n"); + fprintf(stderr, "not running as root: assuming OK\n"); exit(0); } @@ -313,11 +339,25 @@ main() gain_root_privilege(); gain_root_group_privilege(); become_user_permanently(1, 1); +#if (defined(USE_SETRESUID) || defined(USE_SETREUID) || \ + defined(USE_SETEUID) || defined(USE_SETUIDX)) setuid(0); - if (getuid() == 0) { - fprintf(stderr,"uid not set permanently\n"); + if (getuid() == 0) + { + fprintf(stderr, "uid not set permanently\n"); + exit(1); + } +#endif + +#if (defined(USE_SETRESGID) || defined(USE_SETREGID) || \ + defined(USE_SETEGID) || defined(USE_SETGIDX)) + setgid(0); + if (getgid() == 0) + { + fprintf(stderr, "gid not set permanently\n"); exit(1); } +#endif printf("OK\n"); diff --git a/source/lsarpcd/srv_lsa_samdb.c b/source/lsarpcd/srv_lsa_samdb.c index 76306ded813..a7ad6ffa516 100644 --- a/source/lsarpcd/srv_lsa_samdb.c +++ b/source/lsarpcd/srv_lsa_samdb.c @@ -373,7 +373,11 @@ uint32 _lsa_lookup_sids(const POLICY_HND * hnd, if (map_domain_sid_to_name(&find_sid, dom_name)) { sid_name_use = SID_NAME_DOMAIN; - name[0] = 0; + /* + * it is currently better to put + * the name also here + */ + fstrcpy(name, dom_name); } else if (sid_split_rid(&find_sid, &rid) && map_domain_sid_to_name(&find_sid, dom_name)) diff --git a/source/msrpc/msrpcd.c b/source/msrpc/msrpcd.c index 13f98129149..9d783d8dda2 100644 --- a/source/msrpc/msrpcd.c +++ b/source/msrpc/msrpcd.c @@ -381,14 +381,8 @@ static void usage(char *pname) /* make absolutely sure we run as root - to handle cases where people are crazy enough to have it setuid */ -#ifdef HAVE_SETRESUID - setresuid(0,0,0); -#else - setuid(0); - seteuid(0); - setuid(0); - seteuid(0); -#endif + gain_root_privilege(); + gain_root_group_privilege(); fault_setup((void (*)(void *))exit_server); CatchSignal(SIGTERM , SIGNAL_CAST dflt_sig); diff --git a/source/param/loadparm.c b/source/param/loadparm.c index ae1d531ddf1..bfc800f9d1c 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -195,6 +195,8 @@ typedef struct int change_notify_timeout; int stat_cache_size; int map_to_guest; + int min_passwd_length; + int oplock_break_wait_time; #if defined(WITH_LDAP) || defined(WITH_NT5LDAP) int ldap_port; int ldap_protocol_version; @@ -557,6 +559,10 @@ static struct parm_struct parm_table[] = {"server ntlmv2", P_ENUM, P_GLOBAL, &Globals.bServerNTLMv2, NULL, enum_bool_auto, FLAG_BASIC}, {"client ntlmv2", P_ENUM, P_GLOBAL, &Globals.bClientNTLMv2, NULL, enum_bool_auto, FLAG_BASIC}, {"use rhosts", P_BOOL, P_GLOBAL, &Globals.bUseRhosts, NULL, NULL, 0}, + {"alternate permissions",P_BOOL,P_LOCAL, &sDefault.bAlternatePerm, NULL, NULL, FLAG_GLOBAL|FLAG_DEPRECATED}, + {"hosts equiv", P_STRING, P_GLOBAL, &Globals.szHostsEquiv, NULL, NULL, 0}, + {"min passwd length", P_INTEGER, P_GLOBAL, &Globals.min_passwd_length, NULL, NULL, 0}, + {"min password length", P_INTEGER, P_GLOBAL, &Globals.min_passwd_length, NULL, NULL, 0}, {"map to guest", P_ENUM, P_GLOBAL, &Globals.map_to_guest, NULL, enum_map_to_guest, 0}, {"null passwords", P_BOOL, P_GLOBAL, &Globals.bNullPasswords, NULL, NULL, 0}, {"password server", P_STRING, P_GLOBAL, &Globals.szPasswordServer, NULL, NULL, 0}, @@ -569,7 +575,6 @@ static struct parm_struct parm_table[] = {"smb group file", P_STRING, P_GLOBAL, &Globals.szSMBGroupFile, NULL, NULL, 0}, {"smb alias file", P_STRING, P_GLOBAL, &Globals.szSMBAliasFile, NULL, NULL, 0}, #endif - {"hosts equiv", P_STRING, P_GLOBAL, &Globals.szHostsEquiv, NULL, NULL, 0}, {"root directory", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, {"root dir", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, {"root", P_STRING, P_GLOBAL, &Globals.szRootdir, NULL, NULL, 0}, @@ -581,7 +586,6 @@ static struct parm_struct parm_table[] = {"username level", P_INTEGER, P_GLOBAL, &Globals.unamelevel, NULL, NULL, 0}, {"unix password sync", P_BOOL, P_GLOBAL, &Globals.bUnixPasswdSync, NULL, NULL, 0}, {"dfs map", P_STRING, P_GLOBAL, &Globals.szDfsMap, NULL, NULL, 0}, - {"alternate permissions",P_BOOL,P_LOCAL, &sDefault.bAlternatePerm, NULL, NULL, FLAG_GLOBAL|FLAG_DEPRECATED}, {"revalidate", P_BOOL, P_LOCAL, &sDefault.bRevalidate, NULL, NULL, FLAG_GLOBAL}, {"username", P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, FLAG_GLOBAL}, {"user", P_STRING, P_LOCAL, &sDefault.szUsername, NULL, NULL, 0}, @@ -614,6 +618,7 @@ static struct parm_struct parm_table[] = {"allow hosts", P_STRING, P_LOCAL, &sDefault.szHostsallow, NULL, NULL, 0}, {"hosts deny", P_STRING, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, FLAG_GLOBAL|FLAG_BASIC|FLAG_PRINT}, {"deny hosts", P_STRING, P_LOCAL, &sDefault.szHostsdeny, NULL, NULL, 0}, + #ifdef WITH_SSL {"Secure Socket Layer Options", P_SEP, P_SEPARATOR}, @@ -881,7 +886,7 @@ static void init_globals(void) if (!done_init) { int i; - bzero((void *)&Globals,sizeof(Globals)); + memset((void *)&Globals,'\0',sizeof(Globals)); for (i = 0; parm_table[i].label; i++) if ((parm_table[i].type == P_STRING || @@ -962,7 +967,6 @@ static void init_globals(void) Globals.bDebugHiresTimestamp = False; Globals.bDebugPid = False; Globals.bDebugUid = False; - Globals.os_level = 32; Globals.max_ttl = 60*60*24*3; /* 3 days default. */ Globals.max_wins_ttl = 60*60*24*6; /* 6 days default. */ Globals.min_wins_ttl = 60*60*6; /* 6 hours default. */ @@ -993,6 +997,8 @@ static void init_globals(void) Globals.bNTPipeSupport = True; /* Do NT pipes by default. */ Globals.bStatCache = True; /* use stat cache by default */ Globals.map_to_guest = 0; /* By Default, "Never" */ + Globals.min_passwd_length = 5; /* By Default, 5. */ + Globals.oplock_break_wait_time = 10; /* By Default, 10 msecs. */ #if defined(WITH_LDAP) || defined(WITH_NT5LDAP) /* default values for ldap */ @@ -1053,6 +1059,7 @@ static void init_globals(void) */ + Globals.os_level = 32; Globals.bPreferredMaster = Auto; /* depending on bDomainMaster */ Globals.bLocalMaster = True; Globals.bDomainMaster = Auto; /* depending on bDomainLogons */ @@ -1428,6 +1435,8 @@ FN_GLOBAL_INTEGER(lp_machine_password_timeout,&Globals.machine_password_timeout) FN_GLOBAL_INTEGER(lp_change_notify_timeout,&Globals.change_notify_timeout) FN_GLOBAL_INTEGER(lp_stat_cache_size,&Globals.stat_cache_size) FN_GLOBAL_INTEGER(lp_map_to_guest,&Globals.map_to_guest) +FN_GLOBAL_INTEGER(lp_min_passwd_length,&Globals.min_passwd_length) +FN_GLOBAL_INTEGER(lp_oplock_break_wait_time,&Globals.oplock_break_wait_time) #if defined(WITH_LDAP) || defined(WITH_NT5LDAP) FN_GLOBAL_INTEGER(lp_ldap_port,&Globals.ldap_port) @@ -1556,7 +1565,7 @@ initialise a service to the defaults ***************************************************************************/ static void init_service(service *pservice) { - bzero((char *)pservice,sizeof(service)); + memset((char *)pservice,'\0',sizeof(service)); copy_service(pservice,&sDefault,NULL); } @@ -2100,7 +2109,7 @@ static BOOL handle_coding_system(char *pszParmValue,char **ptr) } /*************************************************************************** -handle the interpretation of the character set system parameter + Handle the interpretation of the character set system parameter ***************************************************************************/ static BOOL handle_character_set(char *pszParmValue,char **ptr) { @@ -2113,6 +2122,7 @@ static BOOL handle_character_set(char *pszParmValue,char **ptr) /*************************************************************************** handle the valid chars lines ***************************************************************************/ + static BOOL handle_valid_chars(char *pszParmValue,char **ptr) { string_set(ptr,pszParmValue); @@ -2127,10 +2137,10 @@ static BOOL handle_valid_chars(char *pszParmValue,char **ptr) return(True); } - /*************************************************************************** handle the include operation ***************************************************************************/ + static BOOL handle_include(char *pszParmValue,char **ptr) { pstring fname; @@ -2204,7 +2214,7 @@ static void init_copymap(service *pservice) if (pservice->copymap) free(pservice->copymap); pservice->copymap = (BOOL *)malloc(sizeof(BOOL)*NUMPARAMETERS); if (!pservice->copymap) - DEBUG(0,("Couldn't allocate copymap!! (size %d)\n",NUMPARAMETERS)); + DEBUG(0,("Couldn't allocate copymap!! (size %d)\n",(int)NUMPARAMETERS)); for (i=0;i<NUMPARAMETERS;i++) pservice->copymap[i] = True; @@ -2530,7 +2540,7 @@ Display the contents of the global structure. static void dump_globals(FILE *f) { int i; - fprintf(f, "# Global parameters\n"); + fprintf(f, "# Global parameters\n[global]\n"); for (i=0;parm_table[i].label;i++) if (parm_table[i].class == P_GLOBAL && @@ -2866,6 +2876,19 @@ void lp_dump(FILE *f, BOOL show_defaults) } } +/*************************************************************************** +Display the contents of one service in human-readable form. +***************************************************************************/ +void lp_dump_one(FILE *f, BOOL show_defaults, int snum) +{ + if (VALID(snum)) + { + if (iSERVICE(snum).szService[0] == '\0') + return; + dump_a_service(pSERVICE(snum), f); + } +} + /*************************************************************************** Return the number of the service with the given name, or -1 if it doesn't diff --git a/source/passdb/pass_check.c b/source/passdb/pass_check.c index 93b9a382d87..c45e3a7799c 100644 --- a/source/passdb/pass_check.c +++ b/source/passdb/pass_check.c @@ -200,6 +200,7 @@ static BOOL dfs_auth(char *user, char *password) sec_passwd_rec_t passwd_rec; sec_login_auth_src_t auth_src = sec_login_auth_src_network; unsigned char dce_errstr[dce_c_error_string_len]; + gid_t egid; if (dcelogin_atmost_once) return (False); @@ -348,16 +349,18 @@ static BOOL dfs_auth(char *user, char *password) * back to being root on error though. JRA. */ - if (setregid(-1, pw->pw_gid) != 0) + egid = getegid(); + + if (set_effective_gid(pw->pw_gid) != 0) { DEBUG(0, ("Can't set egid to %d (%s)\n", pw->pw_gid, strerror(errno))); return False; } - if (setreuid(-1, pw->pw_uid) != 0) + if (set_effective_uid(pw->pw_uid) != 0) { - setgid(0); + set_effective_gid(egid); DEBUG(0, ("Can't set euid to %d (%s)\n", pw->pw_uid, strerror(errno))); return False; @@ -368,12 +371,9 @@ static BOOL dfs_auth(char *user, char *password) &my_dce_sec_context, &err) == 0) { dce_error_inq_text(err, dce_errstr, &err2); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); DEBUG(0, ("DCE Setup Identity for %s failed: %s\n", user, dce_errstr)); - return (False); + goto err; } sec_login_get_pwent(my_dce_sec_context, @@ -381,12 +381,8 @@ static BOOL dfs_auth(char *user, char *password) if (err != error_status_ok) { dce_error_inq_text(err, dce_errstr, &err2); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); DEBUG(0, ("DCE can't get pwent. %s\n", dce_errstr)); - - return (False); + goto err; } passwd_rec.version_number = sec_passwd_c_version_none; @@ -400,26 +396,18 @@ static BOOL dfs_auth(char *user, char *password) if (err != error_status_ok) { dce_error_inq_text(err, dce_errstr, &err2); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); DEBUG(0, ("DCE Identity Validation failed for principal %s: %s\n", user, dce_errstr)); - - return (False); + goto err; } sec_login_certify_identity(my_dce_sec_context, &err); if (err != error_status_ok) { dce_error_inq_text(err, dce_errstr, &err2); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); DEBUG(0, ("DCE certify identity failed: %s\n", dce_errstr)); - - return (False); + goto err; } if (auth_src != sec_login_auth_src_network) @@ -436,10 +424,7 @@ static BOOL dfs_auth(char *user, char *password) user, dce_errstr)); sec_login_purge_context(&my_dce_sec_context, &err); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); - return (False); + goto err; } sec_login_get_pwent(my_dce_sec_context, @@ -448,11 +433,7 @@ static BOOL dfs_auth(char *user, char *password) { dce_error_inq_text(err, dce_errstr, &err2); DEBUG(0, ("DCE can't get pwent. %s\n", dce_errstr)); - - /* Go back to root, JRA. */ - setuid(0); - setgid(0); - return (False); + goto err; } DEBUG(0, ("DCE login succeeded for principal %s on pid %d\n", @@ -471,22 +452,25 @@ static BOOL dfs_auth(char *user, char *password) if (err != error_status_ok) { dce_error_inq_text(err, dce_errstr, &err2); - /* Go back to root, JRA. */ - setuid(0); - setgid(0); DEBUG(0, ("DCE can't get expiration. %s\n", dce_errstr)); - - return (False); + goto err; } - setuid(0); - setgid(0); + set_effective_uid(0); + set_effective_gid(0); DEBUG(0, ("DCE context expires: %s", asctime(localtime(&expire_time)))); dcelogin_atmost_once = 1; return (True); + + err: + + /* Go back to root, JRA. */ + set_effective_uid(0); + set_effective_gid(egid); + return (False); } void dfs_unlogin(void) diff --git a/source/rpc_parse/parse_srv.c b/source/rpc_parse/parse_srv.c index 96456cb2961..4afa76a2b8e 100644 --- a/source/rpc_parse/parse_srv.c +++ b/source/rpc_parse/parse_srv.c @@ -409,8 +409,7 @@ static BOOL srv_io_share_info502(char *desc, /******************************************************************* reads or writes a structure. ********************************************************************/ -void srv_free_share_info_ctr(const char *desc, - SHARE_INFO_CTR *info, +void srv_free_share_info_ctr(SHARE_INFO_CTR *info, uint32 info_level, uint32 count) { if (info == NULL) return; diff --git a/source/rpc_server/srv_srvsvc.c b/source/rpc_server/srv_srvsvc.c index b374f8c23a9..4cd07dec49e 100644 --- a/source/rpc_server/srv_srvsvc.c +++ b/source/rpc_server/srv_srvsvc.c @@ -233,12 +233,16 @@ static BOOL api_srv_net_share_get_info(rpcsrv_struct *p, prs_struct *data, return False; } - status = NT_STATUS_ACCESS_DENIED; + status = _srv_net_share_get_info(&q_n.uni_srv_name, + &q_n.share_name, q_n.info_level, + &ctr);; make_srv_r_net_share_get_info(&r_n, q_n.info_level, &ctr, status); ret = srv_io_r_net_share_get_info("", &r_n, rdata, 0); + srv_free_share_info_ctr(&ctr, q_n.info_level, 1); + return ret; } diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c index 7c602166f95..2b1abc9174e 100644 --- a/source/smbd/chgpasswd.c +++ b/source/smbd/chgpasswd.c @@ -123,8 +123,8 @@ static int dochild(int master, char *slavedev, const char *_name, int slave; struct termios stermios; const struct passwd *pass; - int gid; - int uid; + gid_t gid; + uid_t uid; fstring name; fstrcpy(name, _name); @@ -140,11 +140,8 @@ static int dochild(int master, char *slavedev, const char *_name, gid = pass->pw_gid; uid = pass->pw_uid; -#ifdef HAVE_SETRESUID - setresuid(0, 0, 0); -#else - setuid(0); -#endif + + gain_root_privilege(); /* Start new session - gets rid of controlling terminal. */ if (setsid() < 0) @@ -215,19 +212,7 @@ static int dochild(int master, char *slavedev, const char *_name, /* make us completely into the right uid */ if (!as_root) { -#ifdef HAVE_SETRESUID - setresgid(0, 0, 0); - setresuid(0, 0, 0); - setresgid(gid, gid, gid); - setresuid(uid, uid, uid); -#else - setuid(0); - seteuid(0); - setgid(gid); - setegid(gid); - setuid(uid); - seteuid(uid); -#endif + become_user_permanently(uid, gid); } DEBUG(10, diff --git a/source/smbd/quotas.c b/source/smbd/quotas.c index afabb1befdf..329f261f273 100644 --- a/source/smbd/quotas.c +++ b/source/smbd/quotas.c @@ -30,6 +30,17 @@ extern int DEBUGLEVEL; +#if defined(VXFS_QUOTA) + +/* + * In addition to their native filesystems, some systems have Veritas VxFS. + * Declare here, define at end: reduces likely "include" interaction problems. + * David Lee <T.D.Lee@durham.ac.uk> + */ +BOOL disk_quotas_vxfs(const pstring name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize); + +#endif /* VXFS_QUOTA */ + #ifdef LINUX #include <sys/types.h> @@ -47,7 +58,6 @@ try to get the disk space from disk quotas (LINUX version) BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) { - uid_t euser_id; int r; struct dqblk D; SMB_STRUCT_STAT S; @@ -55,6 +65,9 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U struct mntent *mnt; SMB_DEV_T devno; int found; + uid_t euser_id; + + euser_id = geteuid(); /* find the block device file */ @@ -81,10 +94,10 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U return(False); } - euser_id=geteuid(); - seteuid(0); + save_re_uid(); + set_effective_uid(0); r=quotactl(QCMD(Q_GETQUOTA,USRQUOTA), mnt->mnt_fsname, euser_id, (caddr_t)&D); - seteuid(euser_id); + restore_re_uid(); /* Use softlimit to determine disk space, except when it has been exceeded */ *bsize = 1024; @@ -212,11 +225,10 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U *dsize = request.qf_entry.user_q.f_use ; - if ( *dfree ) - *dfree -= *dsize ; - - if ( *dfree < 0 ) + if ( *dfree < *dsize ) *dfree = 0 ; + else + *dfree -= *dsize ; *bsize = 4096 ; /* Cray blocksize */ @@ -244,13 +256,13 @@ Quota code by Peter Urbanec (amiga@cse.unsw.edu.au). BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) { - uid_t user_id, euser_id; + uid_t euser_id; int ret; struct dqblk D; #if defined(SUNOS5) struct quotctl command; int file; - struct mnttab mnt; + static struct mnttab mnt; static pstring name; #else /* SunOS4 */ struct mntent *mnt; @@ -261,6 +273,8 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U SMB_DEV_T devno ; static SMB_DEV_T devno_cached = 0 ; int found ; + + euser_id = geteuid(); if ( sys_stat(path,&sbuf) == -1 ) return(False) ; @@ -312,18 +326,14 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U return(False) ; } - euser_id = geteuid(); - user_id = getuid(); - - setuid(0); /* Solaris seems to want to give info only to super-user */ - seteuid(0); + save_re_uid(); + set_effective_uid(0); #if defined(SUNOS5) DEBUG(5,("disk_quotas: looking for quotas file \"%s\"\n", name)); if((file=sys_open(name, O_RDONLY,0))<0) { - setuid(user_id); /* Restore the original UID status */ - seteuid(euser_id); - return(False); + restore_re_uid(); + return(False); } command.op = Q_GETQUOTA; command.uid = euser_id; @@ -335,12 +345,22 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U ret = quotactl(Q_GETQUOTA, name, euser_id, &D); #endif - setuid(user_id); /* Restore the original uid status. */ - seteuid(euser_id); + restore_re_uid(); if (ret < 0) { DEBUG(5,("disk_quotas ioctl (Solaris) failed. Error = %s\n", strerror(errno) )); - return(False); + +#if defined(SUNOS5) && defined(VXFS_QUOTA) + /* If normal quotactl() fails, try vxfs private calls */ + set_effective_uid(euser_id); + DEBUG(5,("disk_quotas: mount type \"%s\"\n", mnt.mnt_fstype)); + if ( 0 == strcmp ( mnt.mnt_fstype, "vxfs" )) { + ret = disk_quotas_vxfs(name, path, bsize, dfree, dsize); + return(ret); + } +#else + return(False); +#endif } @@ -353,14 +373,13 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U if (D.dqb_bsoftlimit==0) return(False); *bsize = DEV_BSIZE; - *dfree = D.dqb_bsoftlimit - D.dqb_curblocks; *dsize = D.dqb_bsoftlimit; - if(*dfree < 0) - { + if (D.dqb_curblocks > D.dqb_bsoftlimit) { *dfree = 0; *dsize = D.dqb_curblocks; - } + } else + *dfree = D.dqb_bsoftlimit - D.dqb_curblocks; DEBUG(5,("disk_quotas for path \"%s\" returning bsize %.0f, dfree %.0f, dsize %.0f\n", path,(double)*bsize,(double)*dfree,(double)*dsize)); @@ -378,21 +397,26 @@ try to get the disk space from disk quotas - OSF1 version BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) { - uid_t user_id, euser_id; int r, save_errno; struct dqblk D; SMB_STRUCT_STAT S; + uid_t euser_id; + /* + * This code presumes that OSF1 will only + * give out quota info when the real uid + * matches the effective uid. JRA. + */ euser_id = geteuid(); - user_id = getuid(); + save_re_uid(); + if (set_re_uid() != 0) return False; - setreuid(euser_id, -1); r= quotactl(path,QCMD(Q_GETQUOTA, USRQUOTA),euser_id,(char *) &D); - if (r) + if (r) { save_errno = errno; + } - if (setreuid(user_id, -1) == -1) - DEBUG(5,("Unable to reset uid to %d\n", user_id)); + restore_re_uid(); *bsize = DEV_BSIZE; @@ -423,7 +447,7 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U return (True); } -#elif defined (SGI6) +#elif defined (IRIX6) /**************************************************************************** try to get the disk space from disk quotas (IRIX 6.2 version) ****************************************************************************/ @@ -469,7 +493,8 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U } euser_id=geteuid(); - seteuid(0); + save_re_uid(); + set_effective_uid(0); /* Use softlimit to determine disk space, except when it has been exceeded */ @@ -479,7 +504,7 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U { r=quotactl (Q_GETQUOTA, mnt->mnt_fsname, euser_id, (caddr_t) &D); - seteuid(euser_id); /* Restore the original uid status. */ + restore_re_uid(); if (r==-1) return(False); @@ -510,7 +535,7 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U { r=quotactl (Q_XGETQUOTA, mnt->mnt_fsname, euser_id, (caddr_t) &F); - seteuid(euser_id); /* Restore the original uid status. */ + restore_re_uid(); if (r==-1) return(False); @@ -539,8 +564,8 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U } else { - seteuid(euser_id); /* Restore the original uid status. */ - return(False); + restore_re_uid(); + return(False); } return (True); @@ -570,9 +595,9 @@ try to get the disk space from disk quotas - default version BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) { - uid_t euser_id; int r; struct dqblk D; + uid_t euser_id; #if !defined(__FreeBSD__) && !defined(AIX) && !defined(__OpenBSD__) char dev_disk[256]; SMB_STRUCT_STAT S; @@ -584,36 +609,32 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U euser_id = geteuid(); #ifdef HPUX - { - uid_t user_id; - - /* for HPUX, real uid must be same as euid to execute quotactl for euid */ - user_id = getuid(); - setresuid(euser_id,-1,-1); - r=quotactl(Q_GETQUOTA, dev_disk, euser_id, &D); - if (setresuid(user_id,-1,-1)) - DEBUG(5,("Unable to reset uid to %d\n", user_id)); - } + /* for HPUX, real uid must be same as euid to execute quotactl for euid */ + save_re_uid(); + if (set_re_uid() != 0) return False; + + r=quotactl(Q_GETQUOTA, dev_disk, euser_id, &D); + + restore_re_uid(); #else #if defined(__FreeBSD__) || defined(__OpenBSD__) { /* FreeBSD patches from Marty Moll <martym@arbor.edu> */ - uid_t user_id; gid_t egrp_id; - /* Need to be root to get quotas in FreeBSD */ - user_id = getuid(); + save_re_uid(); + set_effective_uid(0); + egrp_id = getegid(); - setuid(0); - seteuid(0); r= quotactl(path,QCMD(Q_GETQUOTA,USRQUOTA),euser_id,(char *) &D); /* As FreeBSD has group quotas, if getting the user quota fails, try getting the group instead. */ - if (r) - r= quotactl(path,QCMD(Q_GETQUOTA,GRPQUOTA),egrp_id,(char *) &D); - setuid(user_id); - seteuid(euser_id); + if (r) { + r= quotactl(path,QCMD(Q_GETQUOTA,GRPQUOTA),egrp_id,(char *) &D); + } + + restore_re_uid(); } #elif defined(AIX) /* AIX has both USER and GROUP quotas: @@ -622,7 +643,7 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U #else /* !__FreeBSD__ && !AIX && !__OpenBSD__ */ r=quotactl(Q_GETQUOTA, dev_disk, euser_id, &D); #endif /* !__FreeBSD__ && !AIX && !__OpenBSD__ */ -#endif /* HAVE_SETRES */ +#endif /* HPUX */ /* Use softlimit to determine disk space, except when it has been exceeded */ #if defined(__FreeBSD__) || defined(__OpenBSD__) @@ -660,3 +681,124 @@ BOOL disk_quotas(char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_U } #endif + +#if defined(VXFS_QUOTA) + +/**************************************************************************** +Try to get the disk space from Veritas disk quotas. + David Lee <T.D.Lee@durham.ac.uk> August 1999. + +Background assumptions: + Potentially under many Operating Systems. Initially Solaris 2. + + My guess is that Veritas is largely, though not entirely, + independent of OS. So I have separated it out. + + There may be some details. For example, OS-specific "include" files. + + It is understood that HPUX 10 somehow gets Veritas quotas without + any special effort; if so, this routine need not be compiled in. + Dirk De Wachter <Dirk.DeWachter@rug.ac.be> + +Warning: + It is understood that Veritas do not publicly support this ioctl interface. + Rather their preference would be for the user (us) to call the native + OS and then for the OS itself to call through to the VxFS filesystem. + Presumably HPUX 10, see above, does this. + +Hints for porting: + Add your OS to "IFLIST" below. + Get it to compile successfully: + Almost certainly "include"s require attention: see SUNOS5. + In the main code above, arrange for it to be called: see SUNOS5. + Test! + +****************************************************************************/ + +/* "IFLIST" + * This "if" is a list of ports: + * if defined(OS1) || defined(OS2) || ... + */ +#if defined(SUNOS5) + +#if defined(SUNOS5) +#include <sys/fs/vx_solaris.h> +#endif +#include <sys/fs/vx_machdep.h> +#include <sys/fs/vx_layout.h> +#include <sys/fs/vx_quota.h> +#include <sys/fs/vx_aioctl.h> +#include <sys/fs/vx_ioctl.h> + +BOOL disk_quotas_vxfs(const pstring name, char *path, SMB_BIG_UINT *bsize, SMB_BIG_UINT *dfree, SMB_BIG_UINT *dsize) +{ + uid_t user_id, euser_id; + int ret; + struct vx_dqblk D; + struct vx_quotctl quotabuf; + struct vx_genioctl genbuf; + pstring qfname; + int file; + + /* + * "name" may or may not include a trailing "/quotas". + * Arranging consistency of calling here in "quotas.c" may not be easy and + * it might be easier to examine and adjust it here. + * Fortunately, VxFS seems not to mind at present. + */ + pstrcpy(qfname, name) ; + /* pstrcat(qfname, "/quotas") ; */ /* possibly examine and adjust "name" */ + + euser_id = geteuid(); + set_effective_uid(0); + + DEBUG(5,("disk_quotas: looking for VxFS quotas file \"%s\"\n", qfname)); + if((file=sys_open(qfname, O_RDONLY,0))<0) { + set_effective_uid(euser_id); + return(False); + } + genbuf.ioc_cmd = VX_QUOTACTL; + genbuf.ioc_up = (void *) "abuf; + + quotabuf.cmd = VX_GETQUOTA; + quotabuf.uid = euser_id; + quotabuf.addr = (caddr_t) &D; + ret = ioctl(file, VX_ADMIN_IOCTL, &genbuf); + close(file); + + set_effective_uid(euser_id); + + if (ret < 0) { + DEBUG(5,("disk_quotas ioctl (VxFS) failed. Error = %s\n", strerror(errno) )); + return(False); + } + + /* Use softlimit to determine disk space. A user exceeding the quota is told + * that there's no space left. Writes might actually work for a bit if the + * hardlimit is set higher than softlimit. Effectively the disk becomes + * made of rubber latex and begins to expand to accommodate the user :-) + */ + DEBUG(5,("disk_quotas for path \"%s\" block c/s/h %ld/%ld/%ld; file c/s/h %ld/%ld/%ld\n", + path, D.dqb_curblocks, D.dqb_bsoftlimit, D.dqb_bhardlimit, + D.dqb_curfiles, D.dqb_fsoftlimit, D.dqb_fhardlimit)); + + if (D.dqb_bsoftlimit==0) + return(False); + *bsize = DEV_BSIZE; + *dsize = D.dqb_bsoftlimit; + + if (D.dqb_curblocks > D.dqb_bsoftlimit) { + *dfree = 0; + *dsize = D.dqb_curblocks; + } else + *dfree = D.dqb_bsoftlimit - D.dqb_curblocks; + + DEBUG(5,("disk_quotas for path \"%s\" returning bsize %.0f, dfree %.0f, dsize %.0f\n", + path,(double)*bsize,(double)*dfree,(double)*dsize)); + + return(True); +} + +#endif /* SUNOS5 || ... */ + +#endif /* VXFS_QUOTA */ diff --git a/source/smbd/server.c b/source/smbd/server.c index 584c10448b2..0d010aade52 100644 --- a/source/smbd/server.c +++ b/source/smbd/server.c @@ -544,14 +544,8 @@ static void usage(char *pname) /* make absolutely sure we run as root - to handle cases where people are crazy enough to have it setuid */ -#ifdef HAVE_SETRESUID - setresuid(0,0,0); -#else - setuid(0); - seteuid(0); - setuid(0); - seteuid(0); -#endif + gain_root_privilege(); + gain_root_group_privilege(); fault_setup((void (*)(void *))exit_server); CatchSignal(SIGTERM , SIGNAL_CAST dflt_sig); diff --git a/source/srvsvcd/srv_srvsvc_nt.c b/source/srvsvcd/srv_srvsvc_nt.c index adf0b059efb..ac25cfe2bda 100644 --- a/source/srvsvcd/srv_srvsvc_nt.c +++ b/source/srvsvcd/srv_srvsvc_nt.c @@ -32,7 +32,7 @@ extern int DEBUGLEVEL; /******************************************************************* time of day ********************************************************************/ -uint32 _srv_net_remote_tod( UNISTR2 *srv_name, TIME_OF_DAY_INFO *tod ) +uint32 _srv_net_remote_tod(UNISTR2 *srv_name, TIME_OF_DAY_INFO *tod) { struct tm *t; time_t unixdate = time(NULL); @@ -41,18 +41,18 @@ uint32 _srv_net_remote_tod( UNISTR2 *srv_name, TIME_OF_DAY_INFO *tod ) /* set up the */ make_time_of_day_info(tod, - unixdate, - 0, - t->tm_hour, - t->tm_min, - t->tm_sec, - 0, - TimeDiff(unixdate)/60, - 10000, - t->tm_mday, - t->tm_mon + 1, - 1900+t->tm_year, - t->tm_wday); + unixdate, + 0, + t->tm_hour, + t->tm_min, + t->tm_sec, + 0, + TimeDiff(unixdate)/60, + 10000, + t->tm_mday, + t->tm_mon + 1, + 1900+t->tm_year, + t->tm_wday); return 0x0; } @@ -72,9 +72,9 @@ static BOOL make_r_srv_info_101(SRV_INFO_101 *sv101, uint32 platform_id, sv101->ver_major = ver_major; sv101->ver_minor = ver_minor; sv101->srv_type = srv_type; - make_buf_unistr2(&(sv101->uni_comment ), &(sv101->ptr_comment) , comment ); + make_buf_unistr2(&(sv101->uni_comment), &(sv101->ptr_comment), comment); -return True; + return True; } /******************************************************************* @@ -114,38 +114,38 @@ static BOOL make_r_srv_info_102(SRV_INFO_102 *sv102, uint32 platform_id, /******************************************************************* net server get info ********************************************************************/ -uint32 _srv_net_srv_get_info( UNISTR2 *srv_name, uint32 switch_value, - SRV_INFO_CTR *ctr) +uint32 _srv_net_srv_get_info(UNISTR2 *srv_name, uint32 switch_value, + SRV_INFO_CTR *ctr) { switch (switch_value) { case 102: { make_r_srv_info_102(&(ctr->srv.sv102), - 500, /* platform id */ - global_myname, - lp_serverstring(), - lp_major_announce_version(), - lp_minor_announce_version(), - lp_default_server_announce(), - 0xffffffff, /* users */ - 0xf, /* disc */ - 0, /* hidden */ - 240, /* announce */ - 3000, /* announce delta */ - 100000, /* licenses */ - "c:\\"); /* user path */ + 500, /* platform id */ + global_myname, + lp_serverstring(), + lp_major_announce_version(), + lp_minor_announce_version(), + lp_default_server_announce(), + 0xffffffff, /* users */ + 0xf, /* disc */ + 0, /* hidden */ + 240, /* announce */ + 3000, /* announce delta */ + 100000, /* licenses */ + "c:\\"); /* user path */ break; } case 101: { make_r_srv_info_101(&(ctr->srv.sv101), - 500, /* platform id */ - global_myname, - lp_major_announce_version(), - lp_minor_announce_version(), - lp_default_server_announce(), - lp_serverstring()); + 500, /* platform id */ + global_myname, + lp_major_announce_version(), + lp_minor_announce_version(), + lp_default_server_announce(), + lp_serverstring()); break; } default: @@ -168,7 +168,7 @@ uint32 _srv_net_srv_get_info( UNISTR2 *srv_name, uint32 switch_value, ********************************************************************/ static void make_srv_share_1_info(SH_INFO_1 *sh1, - SH_INFO_1_STR *str1, int snum) + SH_INFO_1_STR *str1, int snum) { int len_net_name; pstring net_name; @@ -199,7 +199,7 @@ static void make_srv_share_1_info(SH_INFO_1 *sh1, ********************************************************************/ static void make_srv_share_info_1(SRV_SHARE_INFO_1 *sh1, uint32 *snum, - uint32 *svcs) + uint32 *svcs) { uint32 num_entries = 0; (*svcs) = lp_numservices(); @@ -223,8 +223,8 @@ static void make_srv_share_info_1(SRV_SHARE_INFO_1 *sh1, uint32 *snum, sh1->info_1_str[num_entries] = g_new(SH_INFO_1_STR, 1); make_srv_share_1_info(sh1->info_1 [num_entries], - sh1->info_1_str[num_entries], - (*snum)); + sh1->info_1_str[num_entries], + (*snum)); /* move on to creating next share */ num_entries++; @@ -260,6 +260,7 @@ static void make_srv_share_2_info(SH_INFO_2 *sh2, pstring path; pstring passwd; uint32 type; + uint32 max_uses; pstrcpy(net_name, lp_servicename(snum)); pstrcpy(remark , lp_comment (snum)); @@ -274,8 +275,11 @@ static void make_srv_share_2_info(SH_INFO_2 *sh2, if (strequal("IPC$", net_name)) type = STYPE_IPC; if (net_name[len_net_name] == '$') type |= STYPE_HIDDEN; + max_uses = lp_max_connections(snum); + if (max_uses == 0) max_uses = 0xffffffff; + make_srv_share_info2 (sh2 , net_name, type, remark, 0, - 0xffffffff, 1, path, passwd); + max_uses, 1, path, passwd); make_srv_share_info2_str(str2, net_name, remark, path, passwd); } @@ -288,7 +292,7 @@ static void make_srv_share_2_info(SH_INFO_2 *sh2, ********************************************************************/ static void make_srv_share_info_2(SRV_SHARE_INFO_2 *sh2, uint32 *snum, - uint32 *svcs) + uint32 *svcs) { uint32 num_entries = 0; (*svcs) = lp_numservices(); @@ -331,11 +335,38 @@ static void make_srv_share_info_2(SRV_SHARE_INFO_2 *sh2, uint32 *snum, } /******************************************************************* + fill in a share info level 2 structure. + + this function breaks the rule that i'd like to be in place, namely + it doesn't receive its data as arguments: it has to call lp_xxxx() + functions itself. yuck. + + see ipc.c:fill_share_info() + + ********************************************************************/ +static void make_srv_share_502_info(SH_INFO_502_HDR *sh502, + SH_INFO_502_DATA *str502, + int snum) +{ + if (sh502 == NULL || str502 == NULL) return; + + make_srv_share_2_info(&(sh502->info2_hdr), + &(str502->info2_str), + snum); + + /* currently, no SD */ + sh502->sd_size = 0; + sh502->sd_ptr = 0; + str502->sd_size2 = 0; + ZERO_STRUCT(str502->sd); +} + +/******************************************************************* makes a SRV_R_NET_SHARE_ENUM structure. ********************************************************************/ static uint32 make_srv_share_info_ctr(SRV_SHARE_INFO_CTR *ctr, - int switch_value, uint32 *resume_hnd, - uint32 *total_entries) + int switch_value, uint32 *resume_hnd, + uint32 *total_entries) { uint32 status = 0x0; DEBUG(5,("make_srv_share_info_ctr: %d\n", __LINE__)); @@ -346,17 +377,15 @@ static uint32 make_srv_share_info_ctr(SRV_SHARE_INFO_CTR *ctr, { case 1: { - make_srv_share_info_1(&(ctr->share.info1), - resume_hnd, - total_entries); + make_srv_share_info_1(&(ctr->share.info1), + resume_hnd, total_entries); ctr->ptr_share_ctr = 1; break; } case 2: { - make_srv_share_info_2(&(ctr->share.info2), - resume_hnd, - total_entries); + make_srv_share_info_2(&(ctr->share.info2), + resume_hnd, total_entries); ctr->ptr_share_ctr = 2; break; } @@ -418,18 +447,68 @@ uint32 _srv_net_share_enum( const UNISTR2 *srv_name, DEBUG(5,("_srv_net_srv_share_enum: %d\n", __LINE__)); - status = make_srv_r_net_share_enum( get_enum_hnd(enum_hnd), - ctr->switch_value, - ctr, - total_entries, - enum_hnd, - share_level ); + status = make_srv_r_net_share_enum(get_enum_hnd(enum_hnd), + ctr->switch_value, + ctr, total_entries, + enum_hnd, share_level); DEBUG(5,("_srv_net_srv_share_enum: %d\n", __LINE__)); return status; } + +/******************************************************************* +net share get info +********************************************************************/ +uint32 _srv_net_share_get_info(const UNISTR2 *srv_name, + const UNISTR2 *share_name, uint32 info_level, + SHARE_INFO_CTR *ctr) +{ + fstring share; + int snum; + uint32 status; + + if (share_name == NULL || ctr == NULL) + { + return NT_STATUS_INVALID_PARAMETER; + } + + unistr2_to_ascii(share, share_name, sizeof(share)-1); + if (share == NULL) return NT_STATUS_NO_MEMORY; + + snum = lp_servicenumber(share); + + if (snum < 0) + { + /* no such service */ + /* safe_free(share); */ + return NT_STATUS_ACCESS_DENIED; /* check this */ + } + + switch(info_level) + { + case 502: + ctr->info502 = g_new(SHARE_INFO_502, 1); + if (ctr->info502 == NULL) + { + status = NT_STATUS_NO_MEMORY; + break; + } + make_srv_share_502_info(&(ctr->info502->info502_hdr), + &(ctr->info502->info502_data), + snum); + status = NT_STATUS_NOPROBLEMO; + break; + default: + status = NT_STATUS_INVALID_INFO_CLASS; + } + + /* safe_free(share); */ + + return status; +} + /******************************************************************* fill in a sess info level 1 structure. @@ -459,7 +538,7 @@ static void make_srv_sess_info_0(SRV_SESS_INFO_0 *ss0, uint32 *snum, uint32 *sto struct connect_record *crec; uint32 session_count; - if (!get_session_count(&crec, &session_count)) + if (!get_session_count(&crec, &session_count)) { (*snum) = 0; (*stot) = 0; @@ -483,7 +562,8 @@ static void make_srv_sess_info_0(SRV_SESS_INFO_0 *ss0, uint32 *snum, uint32 *sto for (; (*snum) < (*stot) && num_entries < MAX_SESS_ENTRIES; (*snum)++) { make_srv_sess_0_info(&(ss0->info_0 [num_entries]), - &(ss0->info_0_str[num_entries]), crec[num_entries].machine); + &(ss0->info_0_str[num_entries]), + crec[num_entries].machine); DEBUG(0,("make_srv_sess_0_info\n")); /* move on to creating next session */ @@ -541,7 +621,7 @@ static void make_srv_sess_info_1(SRV_SESS_INFO_1 *ss1, uint32 *snum, uint32 *sto struct connect_record *crec; uint32 session_count; - if (!get_session_count(&crec, &session_count)) + if (!get_session_count(&crec, &session_count)) { (*snum) = 0; (*stot) = 0; @@ -564,11 +644,14 @@ static void make_srv_sess_info_1(SRV_SESS_INFO_1 *ss1, uint32 *snum, uint32 *sto { for (; (*snum) < (*stot) && num_entries < MAX_SESS_ENTRIES; (*snum)++) { - DEBUG(0,("sess1 machine: %s, uid : %u\n",crec[num_entries].machine,crec[num_entries].uid)); + DEBUG(0, ("sess1 machine: %s, uid : %u\n", + crec[num_entries].machine, + crec[num_entries].uid)); make_srv_sess_1_info(&(ss1->info_1 [num_entries]), - &(ss1->info_1_str[num_entries]), - crec[num_entries].machine, - uidtoname(crec[num_entries].uid), 1, 10, 5, 0); + &(ss1->info_1_str[num_entries]), + crec[num_entries].machine, + uidtoname(crec[num_entries].uid), + 1, 10, 5, 0); /* What are these on the End ??? */ /* move on to creating next session */ @@ -671,10 +754,10 @@ static uint32 make_srv_r_net_sess_enum( uint32 resume_hnd, /******************************************************************* net sess enum ********************************************************************/ -uint32 _srv_net_sess_enum( const UNISTR2 *srv_name, - uint32 switch_value, SRV_SESS_INFO_CTR *ctr, - uint32 preferred_len, ENUM_HND *enum_hnd, - uint32 *total_entries, uint32 sess_level ) +uint32 _srv_net_sess_enum(const UNISTR2 *srv_name, + uint32 switch_value, SRV_SESS_INFO_CTR *ctr, + uint32 preferred_len, ENUM_HND *enum_hnd, + uint32 *total_entries, uint32 sess_level) { uint32 status; @@ -682,11 +765,9 @@ uint32 _srv_net_sess_enum( const UNISTR2 *srv_name, /* set up the */ status = make_srv_r_net_sess_enum(get_enum_hnd(enum_hnd), - ctr->switch_value, - ctr, - total_entries, - enum_hnd, - sess_level ); + ctr->switch_value, + ctr, total_entries, + enum_hnd, sess_level); DEBUG(5,("_srv_net_sess_enum: %d\n", __LINE__)); @@ -707,7 +788,7 @@ static void make_srv_conn_info_0(SRV_CONN_INFO_0 *ss0, uint32 *snum, uint32 *sto struct connect_record *crec; uint32 connection_count; - if (!get_connection_status(&crec, &connection_count)) + if (!get_connection_status(&crec, &connection_count)) { (*snum) = 0; (*stot) = 0; @@ -738,8 +819,6 @@ static void make_srv_conn_info_0(SRV_CONN_INFO_0 *ss0, uint32 *snum, uint32 *sto ss0->num_entries_read = num_entries; ss0->ptr_conn_info = num_entries > 0 ? 1 : 0; ss0->num_entries_read2 = num_entries; - - if ((*snum) >= (*stot)) { @@ -786,13 +865,13 @@ static void make_srv_conn_1_info(CONN_INFO_1 *se1, CONN_INFO_1_STR *str1, static void make_srv_conn_info_1(SRV_CONN_INFO_1 *ss1, uint32 *snum, uint32 *stot) { uint32 num_entries = 0; - time_t current_time; - time_t diff; + time_t current_time; + time_t diff; struct connect_record *crec; uint32 connection_count; - if (!get_connection_status(&crec, &connection_count)) + if (!get_connection_status(&crec, &connection_count)) { (*snum) = 0; (*stot) = 0; @@ -807,8 +886,8 @@ static void make_srv_conn_info_1(SRV_CONN_INFO_1 *ss1, uint32 *snum, uint32 *sto return; } - current_time=time(NULL); - + current_time=time(NULL); + DEBUG(5,("make_srv_conn_1_ss1\n")); if (snum) @@ -817,9 +896,10 @@ static void make_srv_conn_info_1(SRV_CONN_INFO_1 *ss1, uint32 *snum, uint32 *sto { diff = current_time - crec[num_entries].start; make_srv_conn_1_info(&(ss1->info_1 [num_entries]), - &(ss1->info_1_str[num_entries]), - (*snum), 0, 0, 1, diff,uidtoname(crec[num_entries].uid), - crec[num_entries].name); + &(ss1->info_1_str[num_entries]), + (*snum), 0, 0, 1, diff, + uidtoname(crec[num_entries].uid), + crec[num_entries].name); /* FIXME : type of connection + number of locked files */ @@ -878,7 +958,7 @@ static uint32 make_srv_conn_info_ctr(SRV_CONN_INFO_CTR *ctr, default: { DEBUG(5,("make_srv_conn_info_ctr: unsupported switch value %d\n", - switch_value)); + switch_value)); (*resume_hnd = 0); (*total_entries) = 0; ctr->ptr_conn_ctr = 0; @@ -934,11 +1014,9 @@ uint32 _srv_net_conn_enum( const UNISTR2 *srv_name, /* set up the */ status = make_srv_r_net_conn_enum(get_enum_hnd(enum_hnd), - ctr->switch_value, - ctr, - total_entries, - enum_hnd, - conn_level ); + ctr->switch_value, + ctr, total_entries, + enum_hnd, conn_level); DEBUG(5,("_srv_net_conn_enum: %d\n", __LINE__)); @@ -1034,7 +1112,7 @@ static uint32 make_srv_file_info_ctr(SRV_FILE_INFO_CTR *ctr, default: { DEBUG(5,("make_srv_file_info_ctr: unsupported switch value %d\n", - switch_value)); + switch_value)); (*resume_hnd = 0); (*total_entries) = 0; ctr->ptr_file_ctr = 0; @@ -1090,13 +1168,11 @@ uint32 _srv_net_file_enum( const UNISTR2 *srv_name, /* set up the */ status = make_srv_r_net_file_enum(get_enum_hnd(enum_hnd), - ctr->switch_value, - ctr, - total_entries, - enum_hnd, - file_level ); + ctr->switch_value, + ctr, total_entries, + enum_hnd, file_level); DEBUG(5,("_srv_net_file_enum: %d\n", __LINE__)); - return status; + return status; } diff --git a/source/utils/smbrun.c b/source/utils/smbrun.c index 2a94ac32353..b7c678411c6 100644 --- a/source/utils/smbrun.c +++ b/source/utils/smbrun.c @@ -48,35 +48,17 @@ It takes 3 arguments as uid,gid,command and runs command after becoming a non-root user */ int main(int argc,char *argv[]) { - int uid,gid; + uid_t uid; + gid_t gid; close_fds(); if (argc != 4) exit(2); - uid = atoi(argv[1]); - gid = atoi(argv[2]); - - /* first become root - we may need to do this in order to lose - our privilages! */ -#ifdef HAVE_SETRESUID - setresgid(0,0,0); - setresuid(0,0,0); -#else - setuid(0); - seteuid(0); -#endif - -#ifdef HAVE_SETRESUID - setresgid(gid,gid,gid); - setresuid(uid,uid,uid); -#else - setgid(gid); - setegid(gid); - setuid(uid); - seteuid(uid); -#endif + uid = (uid_t)atoi(argv[1]); + gid = (gid_t)atoi(argv[2]); + become_user_permanently( uid, gid); /* paranoia :-) */ if (getuid() != uid) |